jquery - Move all divs with specific class to container -
how can make jquery put of divs specific class container? have function, move divs dynamically. when div gets new class, automatically gets moved container.
is possible?
to move them:
$("#yourcontainer").append( $("div.yourclass") ); or perhaps, avoid touching ones in container:
$("#yourcontainer").append($("div.yourclass").not("#yourcontainer div.yourclass")); for elements exist in dom .append() method moves them new parent specify.
i'm not aware of event triggered change in class, i'm not sure suggest far having happen automatically.
Comments
Post a Comment