I am currently creating an animation in jQuery using Spritely.
How would i go about playing the animation once on mouse over and then stopping the animation on mouse out…
Any Help would be great thanks, Here is the current code:
(function($) {
$('#booth').bind("mouseenter", function() {
$('#phone').sprite({fps: 24, no_of_frames: 36})
$(this).unbind();
});
$('#booth').bind("mouseout", function() {
$(this).stop();
$(this).unbind();
});
})(jQuery);
From the Spritely documentation, it looks like
.spStop()is the method you want: