Skip to content

Cisco-AMP/JQueryPoll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

$.poll

Allows you to poll an AJAX call until your pre-defined condition is met. Ideal for displaying a spinner until an action is complete.

Build

Build Status

API

/*
url: Points to the GET endpoint from where to poll
interval_in_milliseconds: Interval between calls to the url
terminator_callback: A callback function that returns true to indicate end of polling
*/
$.poll(urlToPoll, intervalInMilliseconds, terminatorCallback)
$.poll('http://my/url', 100, (xhr, status, data) => {
    return data.hello === 'world';
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published