jQuery add multiple class
This is my current code, I know its wrong code
$(\'.page-address-edit\').addClass(\'test1\').addClass(\'test2\'); >
$(\'.page-address-edit\').addClass(\'test1\').addClass(\'test2\');
You can do
$('.page-address-edit').addClass('test1 test2');
More here:
More than one class may be added at a time, separated by a space, to the set of matched elements, like so: $("p").addClass("myClass yourClass");
More than one class may be added at a time, separated by a space, to the set of matched elements, like so:
$("p").addClass("myClass yourClass");