0

我有很多这样的..

我想要的是当点击 li 时我不想触发所有 li 下的“.actiontools”类的点击事件

<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>

这是小提琴:http: //jsfiddle.net/napper7/BTcwr/

4

2 回答 2

1
$("li").click(function(event)}{
    event.preventDefault();
    //do your stufff


});
于 2012-11-27T06:25:15.797 回答
1

试试这个:

$("li").find(".actionTools").click(function() {
    return false;
});​
于 2012-11-27T06:35:39.573 回答