Return to Snippet

Revision: 14124
at May 19, 2009 17:13 by conspirator


Initial Code
$(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>");
	}
	)
});

Initial URL

                                

Initial Description
@davidlink
aim: instanteggrolls

Initial Title
jquery split ul into two

Initial Tags
jquery

Initial Language
jQuery