I have used jQuery for a while and understand the basics of selectors and chains. I am now ready to dive into advanced javascript concepts. Now I'm confused with multi-roles of jQuery.
For example,
jQuery.add(...)
This seems to me that jQuery is a javascript Object that we can send a message to.
jQuery(function() {...}) or jQuery(...selector...)
This time, jQuery seems to be a javascript Function that can take some parameters.
What is it exactly?
console.log(typeof jQuery); outputs '> function' :)
Also try this:
var some_name = function() { return 42; };
some_name.some_property = 84;
some_name.some_method = function() { return 63; };
typeof some_name; // outputs "function"
// but...
some_name.some_method(); // ...is also possible :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With