Reputation: 7003
I have the following script that's wrapping one element just fine:
$('.brandModelWrapperGroup').each(function(){
var divs = $(this).find(".brandModelWrapper")
for(var i = 0; i < divs.length; i+=brandModelLineCount) {
divs.slice(i, i+brandModelLineCount).wrapAll("<section class='brandModelLineWrapper'></section>")
}
})
But I need it to wrap not just .brandModelWrapper
, but also .brandModelView
, how could I do that?
Upvotes: 0
Views: 42
Reputation: 82241
Use comma separated multiple selector:
var divs = $(this).find(".brandModelWrapper").add($(this).find(".brandModelView"));
Upvotes: 2