Jquery datatable sdom如何定义id和class两者 [英] Jquery datatable sdom how to define id and class both

查看:150
本文介绍了Jquery datatable sdom如何定义id和class两者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在JQuery datatable中添加一个额外的sdom。所以我添加了下面显示的结构作为我的全部思想的一部分。这是创建一个div,但是类不会来。



任何想法我可能会失踪。让我知道,如果你需要更多的信息

 <#id'class'> 


解决方案

我也有同样的问题。我解决了一个解决方法:

  sDom:'<你的id-here>',
fnInitComplete:function(){
$('#your-id-here')。addClass('add your classes here');
}

希望这有帮助。


I want to add one extra sdom in the JQuery datatable. So I have added the below shown structure as part of my total sdom. This is creating a div but the class is not coming.

Any idea what I may be missing. Let me know if you need any more info

<"#id"'class'>

解决方案

I had the same problem. I solved it with a workaround:

sDom: '<"your-id-here">',
fnInitComplete: function() {
    $('#your-id-here').addClass('add your classes here');
}

Hope this helps.

这篇关于Jquery datatable sdom如何定义id和class两者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆