Hide a div with jquery
I'm trying to dynamically hide a div when a dropdown menu is activated, I am using an applet on my site, and I'm running into problems with it covering the dropdown menu (as it's being drawn ontop of everything). I've been trying this code and variations thereof and to no avail. I'm using wordpress as a base for the site...
$('#megaMenu ul.megaMenu > li.mega-with-sub > a').toggle(
function(e){
e.preventDefault();
$('#gameContent').hide();
},
function(e){
e.preventDefault();
$('#gameContent').show();
}
);
Hope someone can help me here, it'd be much appreciated, the site is:
http://www.nesowns.com
Thanks!
The associated HTML is:
<div align="center" style="display:开发者_开发知识库none" id='gameContent'>
<applet archive="http://www.nesowns.com/run/vNES_213.jar" code="vNES.class" height="480" width="512">
<param name="rom" value="xxxx" />
<param name="romsize" value="xxxx" />
</applet>
</div>
try:
$('#gameContent').show();
and the same for the hide line. This assumes that the div has 'gameContent' as the ID.
精彩评论