What is the difference between a dollar sign and a dollar sign followed by a period in JQuery?

前端 未结 5 1616
余生分开走
余生分开走 2021-01-12 10:48

In jQuery, what is the difference between $ and $.? Please provide a practical explanation if possible.

5条回答
  •  Happy的楠姐
    2021-01-12 11:14

    $ is a reference (or synonym, if you want an analogy) to the global jQuery object. $. calls a static method of the jQuery object, where $() creates a new instance of the jQuery object.

提交回复
热议问题