>From a semantic/accessibility point of view you would ideally add and remove the activity indicators to/from the DOM when they are needed. However if there are parts of your application were accessibility is not much of a concern like the back end, I think it's excusable to go for the quick & dirty way ; ).

Best Regards,
Felix Geisendörfer


Rey Bango schrieb:
Thanks for the heads up Felix. I really understand your point.

Would it make sense then to drop in a div into the html layout and then dynamically add the the image as needed or do you suggest doing both on the fly?

Rey...

Felix Geisendörfer wrote:
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.

Best Regards,
Felix Geisendörfer


Rey Bango schrieb:
Man, that is REALLY powerful John. I added a .hide() method like this:

$("#throbber").hide()
        .ajaxStart(function(){
            $(this).show();
        })
        .ajaxStop(function(){
            $(this).hide();
         });

and then added my div like this:

<div id="throbber"><img src="" width="16" height="16" alt="" border="0" /></div>

and it worked like a charm!

Thanks for your help and patience John.

Rey...

John Resig wrote:
$("#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

  
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?
    

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

  

_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/

_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/

_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to