You don’t need jquery for this, in plain javascript, the following will work!
var intervalId = window.setInterval(function(){
/// call your function here
}, 5000);
To stop the loop you can use
clearInterval(intervalId)
More Related Contents:
- Making custom right-click context menus for my web-app
- How to create a jQuery plugin with methods?
- JQuery to load Javascript file dynamically
- Jquery/Ajax call with timer
- Using jQuery, Restricting File Size Before Uploading
- Get query string parameters url values with jQuery / Javascript (querystring)
- setTimeout / clearTimeout problems
- How to create a JQuery Clock / Timer
- How do I drag multiple elements at once with JavaScript or jQuery?
- window.focus(), self.focus() not working in firefox
- Why is my ‘load’ event/function not beeing executed after switching to jQuery 3?
- I’d like to understand the jQuery plugin syntax
- Compress images on client side before uploading [closed]
- How to disable tooltip in the browser with jQuery?
- Is there a full working example for a jqGrid ColumnChooser? [closed]
- How well does jQuery support backward compatibility?
- Pie chart with jQuery
- How to individually target multiple dropdowns in CSS for Dropkick Plug-in
- Differences between document.ready and $function [duplicate]
- How to detect an audio has finished playing in a web page?
- Implementing jquery UI autocomplete to show suggestions when you type “@”
- What is the role of src and dist folders?
- Javascript, Razor and Escape characters. Like apostrophe
- Highcharts – Keep tooltip showing on click
- Jquery: Filter dropdown list as you type [closed]
- Alternative to eval() javascript [duplicate]
- Queue AJAX calls
- How to write a simple jQuery plugin [closed]
- Jquery if statement with two class conditions [closed]
- Uploading multiple files asynchronously by blueimp jquery-fileupload