Created
July 13, 2012 06:33
-
-
Save joeldbirch/3103140 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
File renamed without changes. -
There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ $(document).ready(function(){ //this will be used more than once so save it to a variable var menu = $('ul.sf-menu') //given that you already seem to have the current page marked with 'current' on the relevant li, //find that li, then find any ancestors of it and add 'current' to them also menu.find('.current').parents('li').addClass('current'); //once you have done that, then initialise Superfish menu.superfish({ pathClass: 'current' }); });