For example, you can often see the following code in jQuery
( function($){
//some code
})(jQuery)
This way you can use $ instead of jQuery;
In mootools you can Written like this, because in mootools $$ represents a set
(function($){
//do sth.
})(document.id)
In Dojo you can write like this
(function(d,$){
})(dojo,dojo. query)
In this case, you can use $ instead of dojo.query in dojo; to achieve fast conversion from jQuery to dojo;
To imitate mootools, you can write like this
(function(d,$,$$){
/ /do sth;
})(dojo.dojo.ById,dojo.query)
This way you can use $ instead of dojo.ById and $$ instead of dojo.query;
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn