How to add timer in jquery
First of all add "timer.jquery.js" file.
cdnjs.cloudflare.com/ajax/libs/timer.jquery/0.7.1/timer.jquery.js
If you want to count the time and after the count time if complete then it send the callback location which you are defined in the window location
$('#').timer({
duration: '2m', /*countdown time limit*/
countdown: true, /*True-starts countdown timer and False-starts count up timer from specific defined time*/
format: '%M:%S Seconds Remaining', /*format of the timer*/
callback: function() {
window.location = "http://test-portal:8080/cpProject/";
}
});
cdnjs.cloudflare.com/ajax/libs/timer.jquery/0.7.1/timer.jquery.js
If you want to count the time and after the count time if complete then it send the callback location which you are defined in the window location
$('#').timer({
duration: '2m', /*countdown time limit*/
countdown: true, /*True-starts countdown timer and False-starts count up timer from specific defined time*/
format: '%M:%S Seconds Remaining', /*format of the timer*/
callback: function() {
window.location = "http://test-portal:8080/cpProject/";
}
});
Comments
Post a Comment