Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

router子页面加swiper,为何只有第一次有效,离开后再返回变无效了 #10

Closed
mengsian opened this issue May 18, 2016 · 1 comment

Comments

@mengsian
Copy link

// home
var home = {
    url: '/',
    className: 'tabbar',
    render: function () {
                    return $('#tpl_home').html();
    },
    bind: function () {
                    swiper = new Swiper({direction: 'horizontal'});
                    $('#container').on('click', '.weui_tabbar_item', function () {
            $(this).addClass('weui_bar_item_on').siblings('.weui_bar_item_on').removeClass('weui_bar_item_on');

                            swiper.next();
        });
    }
};
progrape added a commit that referenced this issue May 19, 2016
progrape added a commit that referenced this issue May 19, 2016
@progrape
Copy link
Owner

新的提交解决了这个问题,demo 中也有演示~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants