js两次回调后拿不到触发事件里声明后的值

这是两个事件 popup把cb传入 popupHide事件中

function popup(title, content, cb, leftText) {    var _html ='<span class="mui-popup-button" onclick="popupHide(' + cb + ')">' + lText + '</span>'
  }function popupHide(cb){    typeof cb === 'function' && cb();
}

然后我执行并把$(this)传入后报了个 Uncaught ReferenceError: _this is not defined

$('body').on('tap', '.removeNumber', function () {    var _this = $(this);
    api.popup('title', 'center', function () {      console.log(_this);      //deleteCard(_this)
    })
  });


三国纷争
浏览 582回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript