$(function () {
var num = 1;
//our function
function theFunction(){
num++;
$('.time').html(num);
}
//run every 1 second
setInterval(theFunction, 1000);
});
Live Demo
Labels
- bootstrap (1)
- css (4)
- jquery (16)
- Live Demo (14)
- Others (2)
- PHP (4)
- prestashop 1.6 (7)
- Topic - Advance (7)
- Topic - basic (27)
- Topic - Semi Advance (16)
- wordpress (6)
- wordpress plugins (1)
- YII (14)
Monday, October 6, 2014
Timer function jquery
This timer is a sample of jquery that is using a normal javascript function to refresh or auto load its content.
Function timer is very useful when we want our javascript function to rerun for an specified time.
Labels:
jquery,
Live Demo,
Topic - basic
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment