Re: [jQuery] Elegant Loading Indicator
I do love the simplicity of this... although I had to modify it for my own purposes :-) // Adds a wait indicator to any ajax requests $(document.body).ajaxStart(function() { $(document.body).append('div id=loadingLoading.../div'); $('#loading').css({padding:2px, fontSize:9pt, position:fixed, top:0, right:0, background:red, color:white}); }).ajaxStop(function() { $('#loading').remove(); }); Rich On 12/8/06, Chris W. Parker [EMAIL PROTECTED] wrote: On Friday, December 08, 2006 2:13 AM Barry Nauta said: For me, the wait cursor indicates an upcoming page refresh (oldschool web?), hence I will probably wait for this cursor to disappear before doing anything else. The beauty of Ajax (one of) IMHO is that you can continue to work on a page... Good point. In this case then the author can use the arrow+hour glass icon. For sure this is available on Windows but I'm not sure about Linux and OSX. Chris. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
That can be optimized too: $(document.body).ajaxStart(function() { $(div id=loadingLoading.../div).appendTo(document.body).css({padding:2px, fontSize:9pt, position:fixed, top:0, right:0, background:red, color:white}); }).ajaxStop(function() { $('#loading').remove(); }); On 12/12/06, Rich Manalang [EMAIL PROTECTED] wrote: I do love the simplicity of this... although I had to modify it for my own purposes :-) // Adds a wait indicator to any ajax requests $(document.body).ajaxStart(function() { $(document.body).append('div id=loadingLoading.../div'); $('#loading').css({padding:2px, fontSize:9pt, position:fixed, top:0, right:0, background:red, color:white}); }).ajaxStop(function() { $('#loading').remove(); }); Rich On 12/8/06, Chris W. Parker [EMAIL PROTECTED]https://mail.google.com/mail?view=cmtf=0[EMAIL PROTECTED] wrote: On Friday, December 08, 2006 2:13 AM Barry Nauta said: For me, the wait cursor indicates an upcoming page refresh (oldschool web?), hence I will probably wait for this cursor to disappear before doing anything else. The beauty of Ajax (one of) IMHO is that you can continue to work on a page... Good point. In this case then the author can use the arrow+hour glass icon. For sure this is available on Windows but I'm not sure about Linux and OSX. Chris. ___ jQuery mailing list discuss@jquery.comhttps://mail.google.com/mail?view=cmtf=0[EMAIL PROTECTED] http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.comhttps://mail.google.com/mail?view=cmtf=0[EMAIL PROTECTED] http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
that's fine too... but you still need to trigger the loading indicator to show up when an ajax request goes out. On 12/12/06, Andy Matthews [EMAIL PROTECTED] wrote: Why not just create the style for the loading bar in your stylesheet? Then you don't have to do that in jQuery. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of *Rich Manalang *Sent:* Tuesday, December 12, 2006 3:59 PM *To:* jQuery Discussion. *Subject:* Re: [jQuery] Elegant Loading Indicator I do love the simplicity of this... although I had to modify it for my own purposes :-) // Adds a wait indicator to any ajax requests $(document.body).ajaxStart(function() { $(document.body).append('div id=loadingLoading.../div'); $('#loading').css({padding:2px, fontSize:9pt, position:fixed, top:0, right:0, background:red, color:white}); }).ajaxStop(function() { $('#loading').remove(); }); Rich On 12/8/06, Chris W. Parker [EMAIL PROTECTED] wrote: On Friday, December 08, 2006 2:13 AM Barry Nauta said: For me, the wait cursor indicates an upcoming page refresh (oldschool web?), hence I will probably wait for this cursor to disappear before doing anything else. The beauty of Ajax (one of) IMHO is that you can continue to work on a page... Good point. In this case then the author can use the arrow+hour glass icon. For sure this is available on Windows but I'm not sure about Linux and OSX. Chris. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
Yep... !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rich Manalang Sent: Tuesday, December 12, 2006 4:21 PM To: jQuery Discussion. Subject: Re: [jQuery] Elegant Loading Indicator that's fine too... but you still need to trigger the loading indicator to show up when an ajax request goes out. On 12/12/06, Andy Matthews [EMAIL PROTECTED] wrote: Why not just create the style for the loading bar in your stylesheet? Then you don't have to do that in jQuery. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rich Manalang Sent: Tuesday, December 12, 2006 3:59 PM To: jQuery Discussion. Subject: Re: [jQuery] Elegant Loading Indicator I do love the simplicity of this... although I had to modify it for my own purposes :-) // Adds a wait indicator to any ajax requests $(document.body).ajaxStart(function() { $(document.body).append('div id=loadingLoading.../div'); $('#loading').css({padding:2px, fontSize:9pt, position:fixed, top:0, right:0, background:red, color:white}); }).ajaxStop(function() { $('#loading').remove(); }); Rich On 12/8/06, Chris W. Parker [EMAIL PROTECTED] wrote: On Friday, December 08, 2006 2:13 AM Barry Nauta said: For me, the wait cursor indicates an upcoming page refresh (oldschool web?), hence I will probably wait for this cursor to disappear before doing anything else. The beauty of Ajax (one of) IMHO is that you can continue to work on a page... Good point. In this case then the author can use the arrow+hour glass icon. For sure this is available on Windows but I'm not sure about Linux and OSX. Chris. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Elegant Loading Indicator
$(document.body).ajaxStart(function() { this.style.cursor = wait; }).ajaxStop(function() { this.style.cursor = default; }); I like the unobtrusive simplicity. -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
On Friday 08 December 2006 10:57, Jörn Zaefferer wrote: $(document.body).ajaxStart(function() { this.style.cursor = wait; }).ajaxStop(function() { this.style.cursor = default; }); I like the unobtrusive simplicity. For me, the wait cursor indicates an upcoming page refresh (oldschool web?), hence I will probably wait for this cursor to disappear before doing anything else. The beauty of Ajax (one of) IMHO is that you can continue to work on a page... I personally wouldn't use this. Just my $0.02 (euro-cents that is ;-) Barry ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
It's nice but surely it implies the whole page is inactive, but in fact you can really just continue and do what you like. Just out of interest do these methods ajaxstart and stop actually work in IE, i was playing last night and couldn't get them to register but in Firefox all was well. I like the unobtrusive simplicity. -- View this message in context: http://www.nabble.com/Elegant-Loading-Indicator-tf2779671.html#a7755953 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
Yes, gorgeuous but what happens if the server fails to respond? Will the cursor be stuck on wait? Jörn Zaefferer wrote: $(document.body).ajaxStart(function() { this.style.cursor = wait; }).ajaxStop(function() { this.style.cursor = default; }); I like the unobtrusive simplicity. -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
Actually, how do this work? I'm a jQuery newbie. I use $.post() like this:: $(document.body).ajaxStart(function() { this.style.cursor = wait; }).ajaxStop(function() { this.style.cursor = default; }); function tidyTextarea(t) { $.post(tidyTagsString, {tagsstring:t.value}, function(result){ if (result) t.value=result; }); } But now I'm getting an error this.style has no properties in the firefox javascript console. Jörn Zaefferer wrote: $(document.body).ajaxStart(function() { this.style.cursor = wait; }).ajaxStop(function() { this.style.cursor = default; }); I like the unobtrusive simplicity. -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
Have a working example? I think I know what it does, but I'm not sure. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jörn Zaefferer Sent: Friday, December 08, 2006 3:57 AM To: jQuery Discussion. Subject: [jQuery] Elegant Loading Indicator $(document.body).ajaxStart(function() { this.style.cursor = wait; }).ajaxStop(function() { this.style.cursor = default; }); I like the unobtrusive simplicity. -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
On Friday, December 08, 2006 3:09 AM Peter Bengtsson said: Yes, gorgeuous but what happens if the server fails to respond? Will the cursor be stuck on wait? Shouldn't it though? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elegant Loading Indicator
On Friday, December 08, 2006 2:13 AM Barry Nauta said: For me, the wait cursor indicates an upcoming page refresh (oldschool web?), hence I will probably wait for this cursor to disappear before doing anything else. The beauty of Ajax (one of) IMHO is that you can continue to work on a page... Good point. In this case then the author can use the arrow+hour glass icon. For sure this is available on Windows but I'm not sure about Linux and OSX. Chris. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/