What is the difference between $ and jQuery

后端 未结 6 1530
自闭症患者
自闭症患者 2020-12-02 01:31

When I try to use $(\"#div_id\") in $(document).ready it returns NULL, but when I use jQuery(\"#div_id\") it returns the actual object

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 02:19

    Looks like something has taken the $, to reassign jQuery to $, try going:

    var $ = jQuery;
    

提交回复
热议问题