Nasrul Hazim Bin Mohamad

jQuery: Show Loading…

May
22
$.ajax(
{
	url: 'http://www.url.com/do-something',
	success: function(result) {
		$('#result').html(result);
	},
	beforeSend: function() {
		$("#loading").show();
	},
	complete: function() {
		$("#loading").hide();
	}
}
);

2 Responses to jQuery: Show Loading…

  1. Pingback: jQuery: Show Loading Before and Hide It After Ajax Call | nasrulhazim.m

  2. Pingback: jQuery: Create Loading Indicator with ajaxSend & ajaxComplete | nasrulhazim.m

Leave a Reply

Your email address will not be published. Required fields are marked *

1 × 2 =