Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (46 sloc) 1.43 kb
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="discontinue.js"></script>
</head>
<body>
<h1>Discontinue.keepon</h1>
Execute an ajax request every 2500 milliseconds (since last completed ajax request):
<pre>
$(window).ready(function(){
// listen to all discontinue events
$.fn.discontinue.verbose( function( event, data ){
$("#console").append( [ "\n", "[", event.namespace,"]", new Date(), event.type, data].join(" ") )
});
// listen to success event
$.fn.discontinue.on( 'success.keepon.discontinue', function(event, data){
console.log(data);
});
// execute standard keepon
$().discontinue.keepon({
delay: 1200,
url:"response.json"
});
});
</pre>
<pre id="console" style="height: 300px; overflow:scroll">
</pre>
<script type="text/javascript">
$(window).ready(function(){
// listen to all discontinue events
$.fn.discontinue.verbose( function( event, data ){
$("#console").append( [ "\n", "[", event.namespace,"]", new Date(), event.type, data].join(" ") )
});
// listen to success event
$.fn.discontinue.on( 'success.keepon.discontinue', function(event, data){
console.log(data);
});
// execute standard keepon
$().discontinue.keepon({
delay: 1200,
url:"response.json"
});
});
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.