Stop previous fades on next fade. Thanks artcfox.

This commit is contained in:
Jason A. Donenfeld 2012-04-19 20:17:12 +02:00
parent 4643b9cd9f
commit 8b7d41937e

View File

@ -289,16 +289,16 @@ $(document).ready(function() {
$("#photo-links").stop().fadeOut("slow"); $("#photo-links").stop().fadeOut("slow");
}); });
$("#next, #back, #fullscreen").mouseenter(function() { $("#next, #back, #fullscreen").mouseenter(function() {
$(this).fadeTo("slow", 1); $(this).stop().fadeTo("slow", 1);
}); });
$("#next, #back").mouseleave(function() { $("#next, #back").mouseleave(function() {
$(this).fadeTo("slow", 0.35); $(this).stop().fadeTo("slow", 0.35);
}); });
if ($.support.fullscreen) { if ($.support.fullscreen) {
$("#fullscreen").show().click(function() { $("#fullscreen").show().click(function() {
$("#photo").fullScreen(); $("#photo").fullScreen();
}).mouseleave(function() { }).mouseleave(function() {
$(this).fadeTo("slow", 0.50); $(this).stop().fadeTo("slow", 0.50);
}); });
} }
$("#metadata-link").click(function() { $("#metadata-link").click(function() {