tags:

views:

36

answers:

2

$(this).hasClass('something') returns a boolean value.

Q: Is there a list of which methods return non jQuery objects?

+3  A: 

When you call a method, you call it for a reason.

If you called the method to find something out (eg, hasClass, is, index, filter, etc), it will return that value.
If you called the method to do something (eg, animate, load, append, etc), it will return the original jQuery object.

Note that "property" methods (eg, val, html, css, width, etc) will fall into different categories depending on how you call them.

For more details, check the documentation.

SLaks
cf_PhillipSenn
My point is that if you're calling the method, you _already_ know what it returns.
SLaks
+3  A: 

Yes, the jQuery API reference should provide this info.

spender
Thanks spender for sending me to the documentation.Is there a summary somewhere? Something like a list of the methods and their return types?I'm envisioning a spreadsheet where the programmer can filter and sort.
cf_PhillipSenn