-
If
$
is an object then how is jQuery able to call it with parenthesis()
, like$('#MYdIV')
. That is my first and most important question. -
I am trying to learn design patterns, and underlaying mechanisms of creating an object. So I want to make library that when user type
myLibrary({option1:true});
he would be able to instantiate an object without using keyword new.Just like jquery and this: http://ift.tt/1P5dMwG In this example he is not using keywordnew
northis
. He is just creating IIFE animate which returns another function with the same name. I don't know how is he able to do that. Is animate bound to global object?
dimanche 1 novembre 2015
how is jQuery able to call an object $
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire