What does function($) mean in javascript?

前端 未结 3 1660
醉酒成梦
醉酒成梦 2021-01-24 19:42

I realize that the $ is just sort of a convention for naming variables pointing to jQuery objects, and is also the function for document.getElementById(), but does function($) m

3条回答
  •  太阳男子
    2021-01-24 20:07

    function($) is an anonymous function that receives the jQuery object as it's sole parameter (of course, you would expect it to be followed by an implementation within {} blocks).

提交回复
热议问题