Syntax error, unrecognized expression for href

后端 未结 4 1622
一生所求
一生所求 2020-12-17 08:31

When I add below script and run. I am getting this:

Uncaught Error: Syntax error, unrecognized expression: ul li a[href=#!id1]

4条回答
  •  执笔经年
    2020-12-17 09:22

    I tried the solution provided by

    https://github.com/jquery/jquery/issues/2885
    

    which worked for me. I search for [href=#] in js and replace with [href*=\\#]

    a[href*=\\#]:not([href=\\#])
    

提交回复
热议问题