Reputation: 780
My jquery code is this
var job=909;
var id=0;
var x=0;
var maxx=50;
$(document).everyTime(4000,function(x){
var div= "#ttt_"+x;
$(div).hide().load('http://localhost/feed_001.php?job='+job+'&id='+id);
var tlHeight = 60;
$(div).animate({height: tlHeight},750).fadeIn(2500);
x = x + 1;
if (x == maxx){
Type here
}
},0);
And i want when the condition x == maxx satisfies the everytime event will stop event
Upvotes: 1
Views: 2200
Reputation: 16934
Add a new second argument known as label
then use stopTime([label_name])
For example:
$(document).everyTime(4000, 'feed_timer', function (x) {
...
if (x == maxx)
{
stopTime('feed_timer');
}
},0);
Upvotes: 1