{"id":20434003,"url":"https://github.com/zewa666/jquery-setinterval","last_synced_at":"2025-05-08T17:33:35.768Z","repository":{"id":151586130,"uuid":"8342835","full_name":"zewa666/jQuery-setInterval","owner":"zewa666","description":"jQuery setInterval implementation using requestAnimFrame","archived":false,"fork":false,"pushed_at":"2013-02-21T20:00:53.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-06T14:20:36.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zewa666.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-21T19:58:40.000Z","updated_at":"2023-04-06T15:33:26.033Z","dependencies_parsed_at":"2023-04-06T15:33:25.793Z","dependency_job_id":null,"html_url":"https://github.com/zewa666/jQuery-setInterval","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewa666%2FjQuery-setInterval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewa666%2FjQuery-setInterval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewa666%2FjQuery-setInterval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zewa666%2FjQuery-setInterval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zewa666","download_url":"https://codeload.github.com/zewa666/jQuery-setInterval/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224750492,"owners_count":17363662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T08:23:19.738Z","updated_at":"2024-11-15T08:23:20.462Z","avatar_url":"https://github.com/zewa666.png","language":"JavaScript","readme":"jQuery setInterval\n=======================\n\njQuery setInterval is an implementation of setInterval using requestAnimFrame to render Frame based animations.\nMoreover this implementation includes as well an optional breakCondition, which is implemented as passed callback and a\nstopNotification, which gets triggered if the breakCondition returns true.\n\nBesides the frame based animation, another feature is that requestAnimFrame will also stop rendering as soon as the Browser tab has\nbeen switched.\nSee Paul Irish' great article about it [here](http://paulirish.com/2011/requestanimationframe-for-smart-animating/).\n\nUsage\n-----\n\n$.setInterval(callback_for_action, interval, callback_for_break_condition, callback_for_stop_notification );\n\nInspect the projects index.html file to see an example setup.\n\nNote: To verify the pause while not active simply open another page in parallel and switch to the other tab\n      while the counting is in progress, then switch back to.\n\n```js\n  // Initialize setInterval\n  $.setInterval(function(){\n    // DO YOUR MAGIC HERE ...\n  }, 500, function() {\n    return (\"SOME CONDITION\") ? true : false;\n  }, function() {\n    // DO STUFF HERE WHEN INTERVAL HAS STOPPED\n  });\n```\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzewa666%2Fjquery-setinterval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzewa666%2Fjquery-setinterval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzewa666%2Fjquery-setinterval/lists"}