preventDefault() won't work for me

后端 未结 2 743
星月不相逢
星月不相逢 2021-01-27 04:59

Why will this refuse to work?
HTML stuff


      
2条回答
  •  佛祖请我去吃肉
    2021-01-27 05:13

    Filter only filters what is already selected. In your case, the #nav-bar element.

    You need this:

    $('div#nav-bar a').click(function(event){
            event.preventDefault();
        });
    

提交回复
热议问题