quick way to move elements around using jquery

/ Published in: JavaScript
Save to your folder(s)

Copy this code and paste it in your HTML
  1. //store the element temporaily
  2. var t= $('#badlyPlaceElement').clone();
  3. //remove the original
  4. $('#badlyPlaceElement').remove();
  5. //add it back in the right place
  6. $('#newPlace').prepend(t[0]);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.