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

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -