Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var updateChart = function updateChart () {
- $.getJSON( "URL.json", function( data ) {
- // callback for event to take place after JSON has been retrieved.
- // data is the object containing the JSON.
- });
- };
- var init = function init () {
- updateChart();
- };
- var cronJob = {
- interval: 0,
- createInterval: function() {
- this.interval = setInterval(updateChart, 500);
- },
- clearInterval: function() {
- clearInterval(this.interval);
- }
- };
- init();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement