0
我正在与每个锂元素内的按钮自动完成。点击此按钮时,我不想调用选择自动完成事件。但是选择事件正在被调用,是否有任何解决方法。按钮点击里面的自动完成
.data("autocomplete")._renderItem = function(ul, item) {
var li= $("<li></li>")
.data("item.autocomplete", item)
.append("<a style='text-align:left' href='google.com'> <span>"+item.label+"</span><input class='prod-list-addbtn' value='ADD' type='button' style='position: relative;top: 6px;'></a>")
.appendTo(ul);
return li;
}
$(document).delegate('ul .prod-list-addbtn', 'click', function (e) {
e.stopPropagation();
e.preventDefault();
alert('dont call select of autocomplete, but still called');
return false;
});
所以你不希望呼吁按钮委托事件绑定点击右键? –