jQuery addClass to various different Divs
My problem seems fairly simple but I don't know the solution.
I have a number of divs with different ID's. I want to use jQuery to add a
class to all of these different divs. Of course I can write out a new line
of jQuery for each div and use .addClass but I was wondering if there was
a way to bunch it all together. Something like:
$('#menu-item-450','#menu-item-451','#menu-item-452','#menu-item-453','#menu-item-454').find('a').addClass('btn-green');
Thanks
No comments:
Post a Comment