$ is not a function - jQuery error

前端 未结 10 1166
余生分开走
余生分开走 2020-11-29 20:41

I have the jQuery loaded fine, I\'ve quadruple-checked, though I\'m getting this error in FireBug \"$ is not a function\" and my code doesn\'t work.

Here\'s my code:

10条回答
  •  失恋的感觉
    2020-11-29 20:51

    There are quite lots of answer based on situation.

    1) Try to replace '$' with "jQuery"

    2) Check that code you are executed are always below the main jquery script.

    
    
    

    3) Pass $ into the function and add "jQuery" as a main function like below.

    
    

提交回复
热议问题