LoginSignup
0
0

More than 5 years have passed since last update.

Syntax error, unrecognized expressionというエラーが出た場合の対処法

Posted at
Uncaught Error: Syntax error, unrecognized expression:

コンソールで上記のようなエラーが出た場合は、引用符のエラーみたいです。

自分は今回、

jQuery('.page-link a[href^=#]').click(function(){
〜
}

と記述したらエラーがでました。

ですので、

jQuery('.page-link a[href^="#"]').click(function(){
〜
}

と「#」の前後にダブルクォーテーションをつけたらエラーがなくなりました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0