Reputation: 2573
What's the correct syntax to insert multiple different classes with jquery. What if I wanted to insert .one
.two
and .three
before the #container
.
$(".one").insertBefore($('#container'));
Thanks for the advice!
Upvotes: 2
Views: 666
Reputation: 9471
Just like with CSS selectors:
$('.one, .two, .three').insertBefore($('#container'));
Upvotes: 3