开发者

Hide a div with jquery

开发者 https://www.devze.com 2023-03-02 04:34 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消