-
Notifications
You must be signed in to change notification settings - Fork 57
$.dynamic()
Arthur Guiot edited this page Jul 25, 2017
·
1 revision
This function is made to dynamically update content by running again and again a function.
You can see this function as a contraption of window.setInterval()
because it's almost the same thing.
To use it, you'll need 2 arguments:
-
callback
- the function that will be runned again and again -
push
(optional) - the interval between each iteration in milliseconds. Its default value is100
.
JS:
var render = {
time: new Date().getTime()/1000,
};
var $ = new DisplayJS(render);
$.dynamic(function() {
render.time = = new Date().getTime()/1000;
}, 1000/30); // 30 fps
$.var(true);
Don't hesitate to ask your questions
- Home
- The Core Languages
- Getting Started: Installation
- The Basics (
$.var()
+$.target()
) - Developing for DisplayJS
-
$.select()
- Text related
- If...else
$.xss()
$.repeat()
$.custom()
$.live()
$.load()
$.on()
$.onEvent()
$.ready()
- Scroll API
$.all()
$.clone()
$.is()
$.valEmpty()
$.remove()
$.show()
&$.hide()
$.ajax()
- Class Related
$.css()
$.getStyle()
- Fade effects
$.extend()
$.dynamic()
$.parent()
- Elements-Nodes
$.component()
$.time_ago()
$.copy()
$.then()
$.sleep()
$.getProp()