iTEgg iTEgg - 4 years ago 118
jQuery Question

JQuery Visible Show

I have the following code:

$('#loading').css("visibility", "visible");

$('#loading').show();


For some reason unknown to me when I use the CSS it works!

But when I use .show();

It does not work. Please kindly help. I am a new to JQuery.

Thank you.

Edit:

<div class="footerOrder" id="loading" style="visibility:visible;">
<img src="../utils/loadingExistenz.gif" width="32" height="32" border="0" />
</div>


Tried this:

<div class="footerOrder" id="loading" style="display:block;">


Then:

$('#loading').hide();


And still no go for some reason!

EDIT: Weird thing is it is working for all the other DIVs!!

Answer Source

Use display:none; instead of visibility

This works fine for me

$(function(){   

    $("#aLink2").click(function(){
        $('#loading').show();
    });  

});‚Äč

Working sample : http://jsfiddle.net/HShHg/6/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download