What is the difference between $ and jQuery

后端 未结 6 1545
自闭症患者
自闭症患者 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:13

    See jQuery.noConflict(). Could other javascript libraries on your page be using the $ variable?

    $ is just a variable that is used to alias jQuery and being a variable, anything could be assigned to it.

提交回复
热议问题