Ajax Tutorials
JQuery stop animation on mouseover
$(function () {
var $alert = $(‘#alert’);
if($alert.length) {
var alerttimer = window.setTimeout(function () {
$alert.trigger(‘click’);
}, 5000);
$alert.animate({height: $alert.css(‘line-height’) || ’50px’}, 200).click(function () {
window.clearTimeout(alerttimer);
$alert.animate({height: ’0′}, 200);
}).mouseover(function(){
window.clearTimeout(alerttimer);
$alert.stop(true);
$alert.height($alert.css(‘line-height’) || ’50px’);
}); }});





Post your comment