Created
October 26, 2009 19:37
-
-
Save jensechu/218954 to your computer and use it in GitHub Desktop.
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
$(".fish").draggable({ | |
drag: function() { | |
$("#picture img").attr({ src: "images/kitty_hungry.png" }); | |
revert: true; | |
}, | |
stop: function () { | |
if($("#picture img").hasClass("eating")) { | |
setTimeout(reset_kitty, 2000); | |
} | |
else { | |
reset_kitty(); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment