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’);
}); }});

1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...

Post your comment

This question is for testing whether you are a human visitor and to prevent automated spam submissions. Please type the term 'Super Hosting' in the text box below:*

Fields with * are manadatory