How can I select all buttons which id
starts with "aaa" that have a class
which name is class_name1
?
Summary:
- select all element which
id
start with "aaa" - inside this group select all button which have a
class
calledclass_name1
- remove this
class
and add a newclass
class_name2
.
The last step should be:
$('#id').removeClass("class_name1").addClass("class_name2");