MUI - 选项卡点击事件

HTML

<div id="segmentedControl" class="mui-segmented-control mui-segmented-control-inverted mui-segmented-control-primary">
    <a class="mui-control-item mui-active title-item" href="#container-1" data-type="1">
        <img src="/images/common/portrait.gif" class="title-img" /><br>淋巴系统</a>
    <a class="mui-control-item title-item" href="#container-2" data-type="2">
        <img src="/images/common/portrait.gif" class="title-img" /><br>淋巴水肿</a>
    <a class="mui-control-item title-item" href="#container-3" data-type="3">
        <img src="/images/common/portrait.gif" class="title-img" /><br>检查治疗</a>
    <a class="mui-control-item title-item" href="#container-4" data-type="4">
        <img src="/images/common/portrait.gif" class="title-img" /><br>患者问答</a>
</div>

JS

mui('#segmentedControl').on('tap', 'a', function(e) {
        //
});

MUI 的选项卡在微信浏览器中加不上 onclick,真坑,改用 MUI 自己的就可以了。

返回文章列表 打赏
本页链接的二维码
打赏二维码
期待你的评论