Guest User

Untitled

a guest
Apr 26th, 2012
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. how to change the content of a header cell in dataTables?
  2. $( oSettings.aoColumns[i].nTh).text();
  3.  
  4. $( oSettings.aoColumns[i].nTh).text("some text");
  5. $( oSettings.aoColumns[i].nTh).html("<a href='#'>some button</a>");
  6.  
  7. "aoColumns": [
  8. /* Select */ {"bSortable": false },
  9. /* Type */ {"sClass": "jqmSorter"},
  10. /* From */ {"bSortable": false },
  11. /* Status */ {"bSortable": false },
  12. ],
  13.  
  14. "fnHeaderCallback": function( nHead ) {
  15. $(nHead).closest('thead').find('.jqmSorter').each( function () {
  16. var sortTitle = $(this).text(),
  17. sortButton =
  18. $( document.createElement( "a" ) ).buttonMarkup({
  19. shadow: false,
  20. corners: false,
  21. theme: 'a',
  22. iconpos: "right",
  23. icon: "ui-icon-radio-off"
  24. })
  25. sortButton.find('.ui-btn-text').text(sortTitle);
  26. $(this).html( sortButton )
  27. sortButton.addClass("colHighTrigger");
  28. });
  29. }
  30.  
  31. $(nRow, '.your_class').html('Your HTML Values');
Advertisement
Add Comment
Please, Sign In to add comment