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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -