/ Published in: JavaScript
Thanks to James for this code.
Expand |
Embed | Plain Text
$(document).ready(function() { // Take all divs that match class .admin-links and move them inside of // the next adjacent sibling div with class .block. var $blocks = $(".block"); $blocks.each(function() { var $block = $(this); var $admin = $(this).prev(); if (!$admin.hasClass("admin-links")) return $block; var $copy = $admin.clone(true); $admin.remove(); $copy.prependTo($block); }); });
You need to login to post a comment.
