How do you change the style of cell in a JQuery.DataTable?

后端 未结 5 1327
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-05 02:39

I have a question about setting the style attributes for a data cell in the jQuery.DataTable. I was able to set the width for each column when initializing the

5条回答
  •  礼貌的吻别
    2021-02-05 03:27

    Cool, I am happy to report that I was able to answer my own question! I just defined a CSS style (alignRight), and added the style to the column like so:

    
    
    oTable = $('#example').dataTable( {  
        "aoColumns" : [   
            { sWidth: '40%' },   
            { sWidth: '60%', sClass: "alignRight" }  
        ]   } );
    

提交回复
热议问题