Hi Scott, I think this will work...but the problem is some of the libraries that I am using do not provide callback functionality..but definitely for most ajax stuff this will work..
Regards, bingo On May 3, 7:40 am, Scott Sauyet <[EMAIL PROTECTED]> wrote: > bingo wrote: > > I am jquery for now almost 3 months. But, one thing I am not able > > still figure out. This is more for a user convience. I want to let > > user know which divs will be updated after certain action. For this, I > > want to show a spinning wheel on the div that will be updated. But I > > am not sure how to do this. I know you can use ajaxStart and ajaxStop, > > but not sure how to make efficient use of them. > > It seems to me that the simplest way to do this is to toggle the class > of the target divs with something that includes a spinner, then toggle > it off in your ajax callback. Something like this: > > CSS: > #target.loading { > padding-top: 50px; > background: url("myspinner.png") top right no-repeat; > } > > HTML: > <div id="target">...</div> > > JS: > > function myAction() { > $("#target").addClass("loading").load("my.url", function() { > $(#target").removeClass("loading"); > }); > } > > I'm sure it won't be as simple as "#target", but that's the main idea... > > Would that do what you're looking for? > > -- Scott > }