Reputation: 119
I'm logging some object, arrays, strings to Chrome console in this jsFiddle:
Some of the console objects have brackets [] around them .. others don't..
What do the brackets mean? ...does a console object look different if its detached from DOM? etc... can't find doc on this..
Thanks much..
Upvotes: 0
Views: 536
Reputation: 5770
jQuery will return an array for all matches to the selector you pass into the $ function. If you want to access the DOM object itself, access that index from the array: $('selector')[0]
Upvotes: 1