Created
September 18, 2009 21:56
-
-
Save kevinold/189318 to your computer and use it in GitHub Desktop.
jquery.droppy patch to keep item "sticky"
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 characters
| # Patch to keep top menu item "sticky" if when you want it to be so | |
| # <li class="hover sticky"><a href="#"></a></li> | |
| diff --git a/public/javascripts/jquery.droppy.js b/public/javascripts/jquery.droppy.js | |
| index 13fda9c..ed85e25 100644 | |
| --- a/public/javascripts/jquery.droppy.js | |
| +++ b/public/javascripts/jquery.droppy.js | |
| @@ -64,7 +64,7 @@ | |
| $('li', this).hover( | |
| function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); }, | |
| - function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); } | |
| + function() { if (!$(this).hasClass('sticky')) { $(this).removeClass('hover'); $('> a', this).re | |
| ); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment