How to add an “id” and “class” in sDom using datatables?

How to add an “id” and “class” in sDom using datatables?

trishatrisha Posts: 5Questions: 4Answers: 0

I'm using jquery datatables and im trying to add an "id" to a

<

div> that already has a "class" selector.

 "sDom": '<"account-list-header" Cf>tip'

Above code has a class="account-list-header"

I tried doing this:"sDom": '<"account-list-header" Cf><"#top">tip',, but it creates a sepearte div and does not attach the "id" to the same dis as of account-list-header.
How can i achieve this using the sDom? Any ideas?

Thanks

Answers

  • tssajotssajo Posts: 1Questions: 0Answers: 0

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

    sDom: '<"account-list-header" Cf>tip',
    fnInitComplete: function() { $('#account-list-header').addClass('your classes here'); }

    I hope this helps others with the same problem.

This discussion has been closed.