Skip to content

samshameem/Ajax-Reusable-Jquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

Ajax-Reusable-Jquery

Jquery prototype reusable ajax function, with option for localstorage and alert for unsaved forms.

How to use it.

The function accepts 3 parameters

1. Trigger element.

2. Args as defined by Ajax.

3. Custom options.

4. Callback function.


ion.App._request(e, params, options, function(){

	alert('Done');

});

This executes a callback function only on success.

Any options you provide to 'params' will override the defaults jquery ajax.

Default options

defaults = {
	msg: 'Processing...',
	cancelAjax: false,
	type: 'GET',
	url: '',
	target: false,
	cache: false,
	loading: false,
	dataArray: '',
}

Dependencies: Jquery 1.0 +

About

Jquery prototype reusable ajax function.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published