mercredi 31 décembre 2014

why encapsulate functions within $()


I'm taking Udacity's "javascript design patterns" and I stumbled upon a code that calls jQuery's object like described below:


In retain.js file (http://ift.tt/1y6Nj9U), the code starts with a call to the jQuery object "$()". Inside it, we can find the Model-Octopus-View declared and initialized.


I don't get why it resides inside the jQuery object and I also don't get how do we get access to it during the life of the application. E.g., I tried to manipulate it through the console, to no avail.





Aucun commentaire:

Enregistrer un commentaire