views:

114

answers:

5

I am having trouble understanding the meaning and more importantly the concept of an object as it relates to jQuery. I understand the basics that its a collection of data that comes in two forms, properties and methods but I kind of get lost on how it works beyond that. Can anyone point me to some good tutorials that maybe helped you understand? I'm hoping to "Get it" once and for all.

Many many thanks for your help! =]

+7  A: 

Remember that jQuery is just a library that runs in Javascript; what you are talking about is the concept of an object in Javascript.

The authority on this kind of thing is Douglas Crockford. I recommend this video as an introduction: http://video.yahoo.com/watch/630959/2974197

JacobM
Thank you Jacob and thank you everyone.
chainwork
A: 

jQuery is mainly used by way of "selectors". Basically, a selector is just a way to encapsulate any HTML elements matching your query. Once you have those items, jQuery can help you do all sorts of things to them.

I would highly recommend bookmarking (or downloading the AIR application for) the jQuery API, as it will greatly assist in learning what things you can do to your selectors.

I hope this helps.

Lance May
+1  A: 

Remember that JQuery is based on CSS. You select various part of your html (with css-alike selectors) and you can then use these parts like an object. This let you use the properties related to that object and various methods useful to modify it.

As a good introduction see this crash course and of course the jQuery documentation (always keep it open while coding with jQuery).

afilatun
+1  A: 

I always found this advanced JavaScript tutorial by John Resig to be very helpful.

Hooray Im Helping
+1  A: 

Understanding pure JavaScript first would be your first objective and learning how objects are defined there. I recommend the JavaScript: the definitive guide By David Flanagan.

Once understanding the JS model you can start looking under the hood of jQuery and understand what is being done. jQuery just takes advantage of the JavaScript language making an easy to use framework: http://www.learningjquery.com/2008/12/peeling-away-the-jquery-wrapper

Glennular