0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[jQuery]Uncaught TypeError: $ is not a functionエラーが出た時の対処[備忘録]

Posted at
$(function(){
$("#buttton").click(function () {
    jQuery("#form").slideToggle();
  });
});

アコーディオンメニューを作成すべく上記のように記載し、
ブラウザで確認したところ
Uncaught TypeError: $ is not a function
というエラーが表示されたため

以下のように
$をjQueryに置換したところ解消。


jQuery(function(){
jQuery("#buttton").click(function () {
    jQuery("#form").slideToggle();
  });
});

使用ブラウザ: chrome
使用CMS: WordPress
参考にしたサイト:
https://command-f.tech/jquery/44

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?