How do i show Processing wheel in Jquery when we click on Search button
when i click on search button i need to sho开发者_如何学JAVAw Processing Wheel in Jquery .Is there any method available to show that.
Essentially, create a div on the page with the loading .gif in it.
$('#loading').hide();
$('#loading').ajaxStart(function() {
$(this).show();
}).ajaxComplete(function() {
$(this).hide();
});
You could always replace the show and hide for fadeIn and fadeOut too.
Edit: Another method is to show the div when the button is clicked, then make the ajax call and use the success function to hide it again.
Are you using jquery ajax to load search results? If so you can use .ajaxStart() and .ajaxComplete() methods to show and hide animation.
精彩评论