/ Published in: jQuery
@davidlink
aim: instanteggrolls
aim: instanteggrolls
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(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>"); } ) });