Created
October 28, 2014 20:52
-
-
Save aijodesigns/1418ceba261d7f93798b to your computer and use it in GitHub Desktop.
Adding Class to UL based on number of child LIs
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
$(document).ready(function () { | |
$('#menu-main ul.sub-menu').each(function() { | |
if ($(this).children('li').length > 7) { | |
$(this).addClass('large'); | |
} | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment