I have a form with two places that use ajax to send information to the server.
$("#loading img").ajaxStart(function(){ // this progress bar is used by both ajax submission. $(this).show(); }).ajaxStop(function(){ $(this).hide(); }); <div id="loading"> <img src="loading4.gif" border="0" /> </div> $('#countyForm').ajaxForm(options); // Case I: use ajax to submit the form $('form#carSelect').change(function(){ // Case II: use ajax to submit the field $.ajax({ ... } }); });
How can I customize ajax in jQuery so that I can use a different progress panel for different ajax views.
Say for case I, I use image1 and case II, I use image2.
thanks
q0987 source share