What does the jQuery() function in jQuery do?

后端 未结 4 667
臣服心动
臣服心动 2021-01-25 08:06

In this video there is a snippet of code that goes something like this:

if (jQuery) {jQuery(function() {
    // ...
})}

I\'ve never seen the

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-25 08:44

    I think it is the same that using $() but you use jQuery() for compatibility with other libs which also use $()

    jQuery can be a variable that store a function. Guess that if is to check if it is not undefined or something like that

提交回复
热议问题