$.post success code example
Example 1: $.post jquery beforesend loader
$("#loading").ajaxStart(function(){
$(this).show();
});
$("#loading").ajaxComplete(function(){
$(this).hide();
});
Example 2: jquery post
$.post( "test.php", { name: "John", time: "2pm" })
.done(function( data ) {
alert( "Data Loaded: " + data );
});
Example 3: jquery post
$.post( "test.php", { name: "John", time: "2pm" } );