jQuery selector for links with # in href attribute

前端 未结 3 1789
耶瑟儿~
耶瑟儿~ 2020-12-29 03:44

I tried to use this jQuery selector:

$(\"a:has(href*=#)\").click(function() {
     alert(\'works\');
});  

but it doesn\'t seem to work. I

3条回答
提交回复
热议问题