复制代码 代码如下:
<script type="text/javascript">
    $(function() {
        $(".designerspanel").each(function(){
            $(this).find(".tabspanel #show:not(:first)").hide();
        });

        $(".designerspanel li").click(function(){   
            idname=$(this).parents('.designerspanel').attr('id');
            current=$("#"+idname+" li:eq(0)").attr('class');
            current=current.replace("black","");
            $("#"+idname+" li").addClass("black");
            $(this).removeClass("black").addClass(current);
            $("#"+idname+" #show").hide();
            $("#"+idname+" #show").eq($("#"+idname+" li").index(this)).show();
        }).css("cursor", "pointer");
    })
</script>

附上html代码

复制代码 代码如下:
<div class="designerspanel" id="AG">
    <a name="AG"></a>
    <div class="wordtitle">Designer Name Order A to G</div>
    <div class="tabspanel">
        <ul>
        <li class="red"><span>Designer Name A</span></li>
        <li class="black"><span>Designer Name B</span></li>
        <li class="black"><span>Designer Name C</span></li>
        <li class="black"><span>Designer Name D</span></li>
        <li class="black"><span>Designer Name E</span></li>
        <li class="black"><span>Designer Name F</span></li>
        <li class="black"><span>Designer Name G</span></li>
        </ul>
        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$A item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage1"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$B item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage1"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$C item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage1"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$D item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage1"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

       
        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$E item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage1"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$F item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage1"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$G item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage1"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>
    </div>
</div>


<div class="designerspanel" id="HN">
    <a name="HN"></a>
    <div class="wordtitle">Designer Name Order H to N</div>
    <div class="tabspanel">
        <ul>
        <li class="blue"><span>Designer Name H</span></li>
        <li class="black"><span>Designer Name I</span></li>
        <li class="black"><span>Designer Name J</span></li>
        <li class="black"><span>Designer Name K</span></li>
        <li class="black"><span>Designer Name L</span></li>
        <li class="black"><span>Designer Name M</span></li>
        <li class="black"><span>Designer Name N</span></li>
        </ul>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$H item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage2"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$I item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage2"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$J item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage2"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$K item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage2"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

               
        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$L item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage2"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$M item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage2"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

                       
        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$N item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage2"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>
    </div>
</div>

 

<div class="designerspanel" id="OT">
    <a name="OT"></a>
    <div class="wordtitle">Designer Name Order O to T</div>
    <div class="tabspanel">
        <ul>
        <li class="he"><span>Designer Name O</span></li>
        <li class="black"><span>Designer Name P</span></li>
        <li class="black"><span>Designer Name Q</span></li>
        <li class="black"><span>Designer Name R</span></li>
        <li class="black"><span>Designer Name S</span></li>
        <li class="black"><span>Designer Name T</span></li>
        </ul>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$O item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage3"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$P item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage3"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

               
        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$Q item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage3"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

               
        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$R item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage3"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

               
        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$S item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage3"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$T item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage3"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>
    </div>
</div>

<div class="designerspanel" id="UZ">
    <a name="UZ"></a>
    <div class="wordtitle">Designer Name Order U to Z</div>
    <div class="tabspanel">
        <ul>
        <li class="qing"><span>Designer Name U</span></li>
        <li class="black"><span>Designer Name V</span></li>
        <li class="black"><span>Designer Name W</span></li>
        <li class="black"><span>Designer Name X</span></li>
        <li class="black"><span>Designer Name Y</span></li>
        <li class="black"><span>Designer Name Z</span></li>
        </ul>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$U item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage4"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$V item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage4"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$W item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage4"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$X item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage4"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$Y item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage4"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>

        <div id="show">
            <div class="namespanel">
                <div class="namespaneltip"></div>
                <div class="designernamelist">
                    <!--{foreach from=$Z item=i}-->
                    <a href="#">{$i.user_name}</a>
                    <!--{/foreach}-->
                </div>
                <div class="namespanelpage4"></div>
            </div>
            <div class="imgspanel"></div>
            <div class="imgspanel"></div>
        </div>
    </div>
</div>

页面效果:

jquery多选项卡效果实例代码(附效果图)

页面比较杂乱,你可以看到很多选项卡,而且有多个选项卡,点击每个选项,内容发生变化,而且颜色也改变。

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com

《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线

暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。

艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。

《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。