As per this question here, I'm trying to have one navigational element in a set of two disappear when the other is hovered. Because one necessarily precedes the other, this is apparently not possible currently with CSS, so it needs to be done with jQuery.
I have the following line of jQuery at the top of my page (inside a script element), but it doesn't appear to be working:
$(document).ready(function(){
$('.sb-bignav:hover').siblings().css({
'opacity': '0',
'-webkit-opacity': '0',
'-moz-opacity': '0'
});
});
I assume the syntax itself is correct, so I presume I'm just not doing this right... Can anyone point out what's wrong?
Thanks!
EDIT: As requested, here's the HTML:
<div id="sb-body">
<a id="sb-nav-previous" class="sb-bignav" title="Previous" onclick="Shadowbox.previous()"></a>
<a id="sb-nav-next" class="sb-bignav" title="Next" onclick="Shadowbox.next()"></a>
<div id="sb-body-inner">
<img style="position: absolute;" src="Corrosion.jpg" id="sb-player" height="405" width="609">
</div>
</div>