$. function signature in jquery

In jquery, which means the following notation

function $.

Is it possible to show that a function is available globally?

+3
source share
3 answers

$is an alias of the object jQuery, so it $.functionmatches the call jQuery.function.

Edit: this also applies to jQuery method .

+9
source

This function behaves the same as $ (document) .ready (), because it should be used to transfer other $ () operations on your page, which depend on the readiness of the DOM. Although this function is technically connected to a circuit, it is actually not very convenient to use to bind to it.

$ is basically a way to call the jQuery class.

+1

, jQuery jQuery $, :

jQuery.doSomething();

$.doSomething();
0

Source: https://habr.com/ru/post/1763088/


All Articles