I mean object as in {} [object Object]. How does it do $(selector) and $.fn.init at the same time?
{} [object Object]
$(selector)
$.fn.init
Can you give me a simple example please?
This isn't unique to jQuery, but an aspect of javascript. All functions are objects. E.g.:
var f = function() { alert('yo'); } f.foo = "bar"; alert(f.foo); // alerts "bar" f(); // alerts "yo"
1.4m articles
1.4m replys
5 comments
57.0k users