简体   繁体   中英

What is the meaning of “$$$1” sign in Bootstrap.js file

In the following JavaScript code there is a dollar sign “$$$1". What does it mean?

 var Util = function ($$$1) {...} //Line 62 bootstrap.js V4 $$$1(this).one(Util.TRANSITION_END, function () { called = true; }); //Line 103 bootstrap.js V4 

It is a reference to jQuery. If you see the definition of the function, it is something like this:

var Util = function ($$$1) {...}($);

Notice the $ at the end. It means that the function expression is being called with a variable $ , which refers to jQuery. Then throughout the function, jQuery is referred to as $$$1 . So, a call like this:

$$$1(this).one(Util.TRANSITION_END ...

becomes like this:

$(this).one(Util.TRANSITION_END ...

which is a regular jQuery event binding.

It's just another variable name, though a pretty opaque one, since it's not descriptive at all. If you search-replaced all $$$1 with someFunc , the script would still work just as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM