我喜欢这样的多人..
我想要的是当点击li时我不想触发“.actiontools”类的点击事件,这是所有li下的
<li>
<div class="bordered collapse-tree">
<div class="actionTools">
<div class="navItemcustom">
<a href="#" class="actionToolsDropDown"><span class="">
Actions</span></a>
<div class="dropscustom">
<a >Add</a>
<a >edit</a>
</div>
</div>
</div>
<div class="title">
test
</div>
</div>
<ol>
<li id="menuid">
<div class="bordered ">
<div class="actionTools">
<div class="navItemcustom">
<a href="#" class="actionToolsDropDown"><span class="">
Actions</span></a>
<div class="dropscustom">
<a >Add</a>
<a >edit</a>
</div>
</div>
</div>
<div class="title">
new
</div>
</div>
</li>
</ol>
</li>
<script type="text/javascript">
(function (cash) {
$.fn.collapsibleList = function () {
this.find("li").each(function (i, li) {
});
return this;
}
})(jQuery);
$(".collapsibleList").collapsibleList();
</script>
答案 0 :(得分:1)
$("li").click(function(event)}{
event.preventDefault();
//do your stufff
});
答案 1 :(得分:1)
试试这个:
$("li").find(".actionTools").click(function() {
return false;
});