0

I want remove classes which are created dynamically using jQuery.

I have a dynamic classes in table like:

   "dynamicHeader","record1","record2","record3"   

I want to remove all classes class name contain 'record'. Thanks Advance.

Karthik Arthik
  • 276
  • 2
  • 18

2 Answers2

4

Try this:

$("*").removeClass (function (index, css) {
    return (css.match (/(^|\s)record-\S+/g) || []).join(' ');
});
husnain_sys
  • 571
  • 4
  • 14
0

this post can help you same request

$("*").removeClass (function (index, css) {
return (css.match (/\brecord-\S+/g) || []).join(' ');
});
Community
  • 1
  • 1
Sebri Zouhaier
  • 745
  • 7
  • 18