af_khan
af_khan

Reputation: 1078

Remove dataTable Class from datatable

Is it possible to remove class="dataTable" from datatable and apply our own class. If so, then how to do it ? I tried Jquery something like this.

  $('#sourceDetails').removeClass('dataTable');

But no effect.

Upvotes: 3

Views: 8959

Answers (4)

Vivek Doshi
Vivek Doshi

Reputation: 58573

Try this one:

$(function () {
    setTimeout(function () {
        $('#sourceDetails').removeClass('dataTable');
    }, 100);
});

Upvotes: 0

Milind Anantwar
Milind Anantwar

Reputation: 82241

Try:

 $('#someid').addClass('newclass').removeClass('dataTable');

Upvotes: 0

Andrei Zhamoida
Andrei Zhamoida

Reputation: 1464

$('table').removeClass('dataTable');

Upvotes: 0

Amit
Amit

Reputation: 15387

Try this

$('#sourceDetails').addClass("NewClassName").removeClass('dataTable');

Upvotes: 2

Related Questions