javascript - How can I wrap multiple elements in a wrapper with jQuery? -
i have following script that's wrapping 1 element fine:
$('.brandmodelwrappergroup').each(function(){ var divs = $(this).find(".brandmodelwrapper") for(var = 0; < divs.length; i+=brandmodellinecount) { divs.slice(i, i+brandmodellinecount).wrapall("<section class='brandmodellinewrapper'></section>") } })
but need wrap not .brandmodelwrapper
, .brandmodelview
, how that?
use comma separated multiple selector:
var divs = $(this).find(".brandmodelwrapper").add($(this).find(".brandmodelview"));
Comments
Post a Comment