/ Published in: jQuery
@davidlink aim: instanteggrolls
Expand |
Embed | Plain Text
$(document).ready(function(){ $('.splitcol').each(function(i){ var colsize = Math.round($(this).find("li").size() / 2); $(this).find("li").each(function(i) { if (i>=colsize){ $(this).addClass('splitcol_right'); } } ) $(this).find('.splitcol_right').insertAfter(this).wrapAll("<ul class='left'></ul>"); } ) });
You need to login to post a comment.
