Javascript: Collection

1. Best alternative for document. ready

2. Ajax Call

$.ajax({
	type:'POST',
	url:YOUR_URL,
	data:{
		param1:value1,
		param2:value2
	},
	dataType:"json",
	success:function(jsonResult){
		alert('success');
	},
	error:function(error){
		alert(error);
	}
});

4. Jquery LIVE element

		$("body").on({
			click:function(){
                            //codes here
			}
		},'selector');
 

Tags:

Comments are closed.