Created
June 17, 2009 22:11
-
-
Save imagehat/131545 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Split into two columns | |
var marker = Math.round($('#sitemap > li').length / 2); | |
$('#sitemap > li').each(function(i) { | |
if (i >= marker) $(this).addClass('colsplit'); | |
}); | |
$('#sitemap li.colsplit').insertAfter('#sitemap').wrapAll('<ul class="columns-2"></ul>').removeClass('colsplit'); | |
$('#sitemap').addClass("columns-2"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great! Thank you! :)