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

不能触发事件 #52

Open
nocodeempire opened this issue Jun 19, 2018 · 0 comments
Open

不能触发事件 #52

nocodeempire opened this issue Jun 19, 2018 · 0 comments

Comments

@nocodeempire
Copy link

define(function (require) {
'use strict';
var $ = require('zepto');
var customElement = require('customElement').create();

/**
 * 第一次进入可视区回调,只会执行一次
 */
customElement.prototype.build = function () {
    // TODO
    var ele = this.element;
    $(ele).find('.page>span').click(function () {
        $(this).addClass('active').siblings().removeClass('active');
        $('.changeimg').attr('src', './images/pinglun' + $('.active').text() + '.png');
    });
};

return customElement;

});

打断点在build里面,不能触发

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

1 participant