Created
May 1, 2013 05:08
-
-
Save blairanderson/5493840 to your computer and use it in GitHub Desktop.
my first jquery GIST. i'm really having fun with jquery this project. i hope to be saving more and more of these in the future found here: http://stackoverflow.com/a/11263756/1536309 proven here: http://jsfiddle.net/6RKHf/ i was hoping to show a list of options on a hover that lasts more than 4 seconds
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
var timeoutId; | |
$("#NewsStrip").hover(function() { | |
if (!timeoutId) { | |
timeoutId = window.setTimeout(function() { | |
timeoutId = null; // EDIT: added this line | |
$("#SeeAllEvents").slideDown('slow'); | |
}, 2000); | |
} | |
}, | |
function () { | |
if (timeoutId) { | |
window.clearTimeout(timeoutId); | |
timeoutId = null; | |
} | |
else { | |
$("#SeeAllEvents").slideUp('slow'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment