Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. var updateChart = function updateChart () {
  2. $.getJSON( "URL.json", function( data ) {
  3. // callback for event to take place after JSON has been retrieved.
  4. // data is the object containing the JSON.
  5. });
  6. };
  7.  
  8. var init = function init () {
  9. updateChart();
  10. };
  11.  
  12. var cronJob = {
  13. interval: 0,
  14. createInterval: function() {
  15. this.interval = setInterval(updateChart, 500);
  16. },
  17. clearInterval: function() {
  18. clearInterval(this.interval);
  19. }
  20. };
  21.  
  22. init();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement