event.stopPropagation Not Working in Firefox

后端 未结 2 1766

I am building a sidebar vertical menu that contains Main Menu items and one level of sub-menu items.

I am using Javascript and CSS so that when the user clicks a top-lev

2条回答
  •  长发绾君心
    2021-01-24 06:54

    You need to pass the event as an argument to your function.

    goTo(event, '#')
    

    Then you can do event.stopPropagation() and it knows what event is.

    http://jsbin.com/OyUvUqa/2

提交回复
热议问题