Created
April 19, 2009 18:54
-
-
Save mikeymicrophone/98171 to your computer and use it in GitHub Desktop.
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
| var in_subnav = false; | |
| function nap (m) {var then = new Date(new Date().getTime() + m); while (new Date() < then) {}} | |
| $(document).ready(function() { | |
| $('#navigation .baseball').mouseenter( function() { | |
| $('#baseball-regions').attr('style', 'left:50px;'); | |
| }); | |
| $('#baseball-regions a:contains(\'Northeast\')').mouseenter( function() { | |
| $('#northeast-areas').attr('style', 'left:100px;'); | |
| $('#southeast-areas').attr('style', 'left:-500px;'); | |
| }); | |
| $('#baseball-regions a:contains(\'Southeast\')').mouseenter( function() { | |
| $('#southeast-areas').attr('style', 'left:100px;'); | |
| $('#northeast-areas').attr('style', 'left:-500px;'); | |
| }); | |
| $('#northeast-areas').mouseenter( function() { | |
| in_subnav = true; | |
| }); | |
| $('#southeast-areas').mouseenter( function() { | |
| in_subnav = true; | |
| }); | |
| $('#northeast-areas').mouseleave( function() { | |
| $('#northeast-areas').attr('style', 'left:-500px;'); | |
| $('#baseball-regions').attr('style', 'left:-500px;'); | |
| in_subnav = false; | |
| }); | |
| $('#southeast-areas').mouseleave( function() { | |
| $('#southeast-areas').attr('style', 'left:-500px;'); | |
| $('#baseball-regions').attr('style', 'left:-500px;'); | |
| in_subnav = false; | |
| }); | |
| $('#baseball-regions').mouseleave( function() { | |
| nap(1000); | |
| alert(in_subnav); | |
| if (in_subnav) { | |
| return true; | |
| } else { | |
| $('#northeast-areas').attr('style', 'left:-500px;'); | |
| $('#southeast-areas').attr('style', 'left:-500px;'); | |
| $('#baseball-regions').attr('style', 'left:-500px;'); | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment