I've got some links that only serve as anchors for javascript, so I
use CSS to hide them like this:

.requiresjavascript
{
    display:none;

}

and here's the HTML:

<a class="requiresjavascript clearall" href="#">Clear all</a>
<a class="requiresjavascript clearall" href="#">Check all</a>

The idea is that for a browser without javascript, those links don't
appear.

I want to show these links when javascript is available, so I have
this in my $(document).ready() at the top:

$(document).ready(function () {
    $(".requiresjavascript").show();

});

That doesn't work.

However, this approach works fine:
    $(".requiresjavascript").removeClass('requiresjavascript');

So, what am I doing wrong?

Reply via email to