3

Possible Duplicate:
JQuery removeClass wildcard
jQuery - Select an element that the class starts with

I have some divs that that belong to zone (a div may have class "zoneA", another div may have class "zoneB", etc.). I want to be able to select multiple divs of that kind, and set a new class to them.

So I would like to do something like:

$(".selected-divs").removeClass("zone*").addClass(".zone-new")

How can I remove all classes in this maner?

Community
  • 1
  • 1
gabitzish
  • 9,535
  • 7
  • 44
  • 65

0 Answers0