views:

28

answers:

2

when i click on search button i need to show Processing Wheel in Jquery .Is there any method available to show that.

A: 

Are you using jquery ajax to load search results? If so you can use .ajaxStart() and .ajaxComplete() methods to show and hide animation.

Giorgi
+1  A: 

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.

Dan