javascript - Meaning of (function($) { })(jQuery) (e.g., in jQuery Enlightenment book) -
I love the "Dome Enlightenment" book and read companion volume for it.
I have used basic jquery, like below and I understand them ..
$ (document) .bind (â ???? contextmenuâ? ???, function () {// do something}}; But the book mentions something like below ... and I do not understand how it is used?
(function ($) {// $ chaos use worry-free alerts ('you're using jQuery' $ (.) .jquery);}) (jQuery) < / code>
(function () {// $ alias worry-free conflict alerts ('you are using jQuery' $$) .jquery);}) () this
$ (). Jquery is used to get jquery version being used.
This anonymous task is used when it Every time we are unconditionally Want a specific code to run.
Comments
Post a Comment