mui 底部导航栏的实现

99封情书 提交于 2019-12-01 12:31:36

mui 底部导航栏的实现

<nav class="mui-bar mui-bar-tab">
    <a id="display" class="mui-tab-item {if $_GPC['op'] == 'display'}mui-active{/if}"
       href="{php echo $this->createMobileUrl('pj_goods', array('op' => 'display'))}">
        <span class="mui-icon mui-icon-bars"></span>
        <span class="mui-tab-label">列表</span>
    </a>
    <a class="mui-tab-item {if $_GPC['op'] == 'detail'}mui-active{/if}" href="">
        <span class="mui-icon mui-icon-info"></span>
        <span class="mui-tab-label">详情</span>
    </a>
    <a id="home" class="mui-tab-item  {if $_GPC['op'] == 'home'}mui-active{/if}"
       href="{php echo $this->createMobileUrl('pj_goods', array('op' => 'home'))}">
        <span class="mui-icon mui-icon-home"></span>
        <span class="mui-tab-label">我的</span>
    </a>
</nav>

<script>
    mui('body').on('tap','a',function(){
        document.location.href = this.href;
    });

    $(function () {
        $("#display").click(function () {
            document.location.href = this.href;
        });
        $("#home").click(function () {
            document.location.href = this.href;
        });
    });
</script>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!