JQuery - add click event to LI or SPAN elements?

前端 未结 4 1478
名媛妹妹
名媛妹妹 2021-02-08 23:00

I am trying to add a click event to a LI element but it is not firing in the page. My page markup looks like:

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-08 23:53

    You sure you have jquery 1.3 included in your code? The following works fine (direct copy and paste from your question) for me when I click on any of the LIs:

    
    
    
    
    
    
    
    
    
    

    Are you sure your updateNavigation function is working right? Maybe it's being triggered but something is wrong within it...

提交回复
热议问题