星期日, 6月 11, 2017

[jQuery] 特殊字元跳脫的錯誤解決方法: Syntax error, unrecognized expression: a[href*=#]:not([href=#])

今天在移轉舊專案程式碼,遇到jquery一些錯誤,
查了一下原來是用的2.x版有特殊字元要跳脫的問題,記錄一下。
Syntax error, unrecognized expression:

your selector is not valid. # is a special char and needs to be escaped like 'a[href*=\\#]:not([href=\\#])'

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

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails