Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. $(function() {
  2. $(".shuffle").each(function() {
  3. var parent = $(this),
  4. divs = parent.children().remove();
  5.  
  6. while (divs.length) {
  7. parent.append(divs.splice(Math.floor(Math.random() * divs.length), 1)[0]);
  8. }
  9. });
  10. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement