/jquery-mobile-pull-to-refresh-jqPTR

This is a good pull-to-refresh function for HTML mobile developed apps using Phonegap or something similar.

Primary LanguageHTML

jquery-mobile-pull-to-refresh---jqPTR

This is good for HTML mobile developed apps using Phonegap or something similar.

Requirements

How to:

In the header you must include ptr.css and ptr.js. After that you will use the function like this:

jqPTR([target_id], [callback]);
jqPTR('ptr',function (){ 
	console.log('Done!'); 
	
	// usually you call just jqPTR_refresh(); 
	// I've added setTimeout because I do not have to wait for an ajax call response
	setTimeout(jqPTR_refresh, 1000); 
});

Don't forget to use jqPTR_refresh after your callback finished processing.

jqPTR_refresh();