I saw jquery code containing jQuery.noConflict method.
I don’t know the purpose, I don’t understand why we need it.
I only understand that this is related to the jquery plugin.
jQuery (and other similar structures) store the alias of the jQuery object in a variable $. It is just for easy pruning when you write code.
$
You could write all your code, like this jQuery('.selector');, instead of using the dollar sign if you want. Conflict-free mode allows you to use a different code (usually a different framework), which also stores something in a dollar sign variable.
jQuery('.selector');
, javascript, , , jQuery, .. $ , jQuery. jQuery.noConflict.
jQuery.noConflict
:
jQuery ( )
Update:
, jQuery.noConflict, $ , jQuery, jQuery, $.
jQuery
, jQuery, :
(function($){ // your code.... })(jQuery);
, , $ , .
Source: https://habr.com/ru/post/1754275/More articles:Как изменить раскладку клавиатуры (решение X11 API) - cAndroid Dev: NO EC / IO? - javaAPI to find out which protobuf message is being sent to - protobuf-netJQuery page at the top of the page - javascriptWaiting for mocha when a build call fails - ruby-on-railsSchedule a routine to run at a specific time - vbasmarty {cycle} and three meanings - smartyСоветы по индексу сервера Sql - sqlNeed help understanding Javascript.match method - javascriptHow do you check the calculator? - testingAll Articles