87,917
社区成员
发帖
与我相关
我的任务
分享
<div class="menu">
<div class="submenu"></div>
</div>
(function() {
var myjQuery = jQuery.sub();
myjQuery.fn.remove = function() {
this.trigger("remove");
return jQuery.fn.remove.apply( this, arguments );
};
myjQuery(function($) {
$(".menu").click(function() {
$(this).find(".submenu").remove();
});
//这个绑定函数没触发,要怎么才能触发呢?
$(document).bind("remove", function(e) {
$(e.target).parent().hide();
});
});
})();
myjQuery(function($) {
$(".menu").click(function() {
$(this).find(".submenu").remove();
});
//这个绑定函数没触发,要怎么才能触发呢?
$(document).bind("remove", function(e) {
$(e.target).parent().hide();
});
});
里面已经将$传进去了啊~在这里$就是代表myjQuery对象吧?