Prevent click from child firing parent click event

后端 未结 4 717
抹茶落季
抹茶落季 2020-12-09 11:45

I have a selector that binds a click event which will remove the popup. However, I only want the selector to handle the click, instead of the children of the selector to be

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 12:10

    try:

    e.stopPropagation();
    return false; 
    

    in your event handler

提交回复
热议问题