zQuery索引与jQuery标签,Superfish菜单有关 [英] z-index issues with jQuery Tabs, Superfish Menu

查看:97
本文介绍了zQuery索引与jQuery标签,Superfish菜单有关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的生活,我无法让我的Superfish菜单停止隐藏在IE 7中的jQuery UI选项卡后面。我已经阅读了那里的文档,尝试更改z-index值并尝试了bgIframe插件,虽然我是不确定我是否正确实现它(在下面的示例中省略,使用Supersubs)。

For the life of me I cannot get my Superfish menu to stop hiding behind my jQuery UI tabs in IE 7. I have read the documentation out there, have tried changing z-index values and tried the bgIframe plugin, although I am not sure if I am implementing it correctly (left out in my example below, using Supersubs).

这是我用于Superfish的Javascript - 使用Supersubs插件:

Here is the Javascript I am using for Superfish - using the Supersubs plugin:

 $(document).ready(function() { 
                        $("ul.sf-menu").supersubs({ 
                        minWidth:    12,   // minimum width of sub-menus in em units 
                        maxWidth:    27,   // maximum width of sub-menus in em units 
                        extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                                   // due to slight rounding differences and font-family 
                    }).superfish({ 
                        delay:       1000,                            // one second delay on mouseout 
                        animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
                        speed:       'medium'                          // faster animation speed 
                    }); 
                    });

这是我页面的结构:

<div id="page-container">
        <div id="header"></div>
        <div id="nav-admin">
            <!-- This is where Superfish goes -->
        </div>
        <div id="header-shadow"></div>
        <div id="content">
            <div id="admin-main">
                <div id="tabs">
                    <ul>
                        <li><a href="#tabs-1">Tab 1</a></li>
                        <li><a href="#tabs-2">Tab 2</a></li>
                    </ul>
                    <div id="tabs-1">
                        <!-- Content for Tab 1 -->
                    </div>
                    <div id="tabs-2">
                        <!-- Content for Tab 2 -->
                    </div>
                </div>
            </div>
        </div>
        <div id="footer-shadow"></div>
        <div id="footer">
            <div id="alt-nav">
                <?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/altnav.inc.php'; //CHANGE WHEN UPLOADED TO MATCH DOCUMENT ROOT ?>
            </div>
        </div>
    </div>


推荐答案

您是否尝试过对您的元素设置position:relative正在设置z-index?这通常可以解决问题。

Have you tried setting position:relative on the elements you are setting the z-index on? That usually does the trick.

这篇关于zQuery索引与jQuery标签,Superfish菜单有关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆