开发者

How to enable click event on an element inside a div for which click event is disabled?

I've used $('#dropMenu').click(false); for one of my div#dropMenu so that clicking on it won't do anything.

Inside the div#dropMenu, I've some other elements as

<div id="dropMenu" class="dropDwn hide">
    <ul>
        <li><a class="userLink" href="link.php">Edit Profile</a></li>
        <li><a class="userLink" href="link2.php">Change Password</a></li>
        <li><a class="userLink" href="logout.php">Logout</a></li>
    </ul>
</div>

and I want to be able to click on the link.

(I开发者_运维技巧 think) since I've used $('#dropMenu').click(false);, the links are not working.

How do I enable clicking on the links a.userLink?


If you want to unbind an event handler use this: $('#dropMenu').unbind('click');

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜