开发者

Different actions for the embedded and the containing element

I have an anchor in a table. I would need an action for the click on the anchor, and another for the开发者_StackOverflow中文版 click on the table ('s cell). But if I click on the anchor, both of the actions will be run off. How can I disable the table's action when I click on the anchor?

Thank you!


try this:

$('anchor').bind('click', function(ev) {

  ev.stopPropagation();

  //... your code

  return false;


});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜