[jQuery] Ajax Throbber How-to?

[jQuery] Ajax Throbber How-to?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content=text/html;charset=ISO-8859-1>
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><SPAN class=484461213-11092006><FONT face=Arial color=#0000ff
size=2>Felix...</FONT></SPAN></DIV>
<DIV><SPAN class=484461213-11092006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=484461213-11092006><FONT face=Arial color=#0000ff size=2>When
was the last time you disabled javascript?</FONT></SPAN></DIV>
<P><FONT size=2><!----------------//------<BR>andy matthews<BR>web
developer<BR>certified advanced coldfusion programmer<BR>ICGLink,
Inc.<BR>andy@icglink.com<BR>615.370.1530
x737<BR>--------------//---------></FONT> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com]<B>On Behalf Of </B>Felix
Geisendörfer<BR><B>Sent:</B> Sunday, September 10, 2006 5:17 AM<BR><B>To:</B>
jQuery Discussion.<BR><B>Subject:</B> Re: [jQuery] Ajax Throbber
How-to?<BR><BR></FONT></DIV>One thing I really hate about AJAX, is that
everybody put's those semantically meaningless activity indicators in their
html layout. When you disable css you end up with a mess of animated gif's
which is really annoying. I don't blame you, but it's a very nice move towards
accessibility and usability to add those div's/images/etc. with javascript to
your DOM instead of having them there already and just hiding them with
CSS.<BR><BR>Best Regards,<BR>Felix Geisendörfer<BR>
<DIV class=moz-signature><SMALL>--------------------------<BR><A
href="http://www.thinkingphp.org">http://www.thinkingphp.org</A><BR><A
href="http://www.fg-webdesign.de">http://www.fg-webdesign.de</A>
</SMALL></DIV><BR><BR>Rey Bango schrieb:
<BLOCKQUOTE cite=mid45038F48.3080200@iambright.com type="cite">Man, that is
REALLY powerful John. I added a .hide() method like
this:<BR><BR>$("#throbber").hide()<BR>       
.ajaxStart(function(){<BR>   
       
$(this).show();<BR>       
})<BR>       
.ajaxStop(function(){<BR>   
       
$(this).hide();<BR>        
});<BR><BR>and then added my div like this:<BR><BR><div
id="throbber"><img src="indicator.gif" width="16" height="16" alt=""
border="0" /></div><BR><BR>and it worked like a
charm!<BR><BR>Thanks for your help and patience
John.<BR><BR>Rey...<BR><BR>John Resig wrote:
<BLOCKQUOTE
cite=mid730bab940609092037w30de69f4n3e38452f493cb44d@mail.gmail.com
type="cite"><PRE wrap="">$("#throbber")
.ajaxStart(function(){
$(this).show();
})
.ajaxStop(function(){
$(this).hide();
});
jQuery's system is more dynamic than just hiding/showing a single
element, as you can see. Let me know if this helps you at all.
--John
</PRE>
<BLOCKQUOTE type="cite"><PRE wrap="">I've seen some Ajax libraries that have an Ajax throbber/indicator
function built in which allows you to specify an indicator during the
Ajax call.
Does JQuery have something like this? If not, whats everyone doing to
display one? Any plugins for this?
</PRE></BLOCKQUOTE><PRE wrap=""><!---->
_______________________________________________
jQuery mailing list
<A class=moz-txt-link-abbreviated href="mailto:discuss@jquery.com">discuss@jquery.com</A>
<A class=moz-txt-link-freetext href="http://jquery.com/discuss/">http://jquery.com/discuss/</A>
</PRE></BLOCKQUOTE><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
jQuery mailing list
<A class=moz-txt-link-abbreviated href="mailto:discuss@jquery.com">discuss@jquery.com</A>
<A class=moz-txt-link-freetext href="http://jquery.com/discuss/">http://jquery.com/discuss/</A>
</PRE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/















































































    • Topic Participants

    • andy