I am almost new to JQuery. So please forgive if it is trivial.
What does this mean in JQuery: var Utilities = $([]);
Is this like defining an array? Any links to an example?
Some more info: After defining that in the code I see:
Utilities.Message = ' some message';
Utilities.function1 = function(message) { some code };
Utilities.function2 = function() { some code};
calling the method: Utilities.function2();
Thanks,
-Sara.
$([])would use thejQuery( elementArray )signature to create an emptyjQuerycollection.The
jQuery()signature, that now does the same, wasn’t available until jQuery 1.4, sojQuery([])could be used before that and can still be used to be compatible with older versions of the library.Prior to 1.4,
jQuery()would do the same asjQuery(document).