Objects in jQuery

It's hard for me to understand the meaning and, more importantly, the concept of an object related to jQuery. I understand the basics of having my own data collection, which comes in two forms, properties and methods, but I’m kinda lost on how it works outside of it. Can someone point me to some good tutorials that may have helped you understand? I hope β€œGet It” once and for all.

Many thanks for your help! =]

+4
source share
5 answers

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

The power in this regard is Douglas Crockford. I recommend this video as an introduction: http://video.yahoo.com/watch/630959/2974197

+7
source

I have always found this advanced JavaScript course from John Resig to be very helpful.

+2
source

Remember that jQuery is CSS based. You select any part of your html (with css type selectors), and you can use these parts as an object. This will allow you to use the properties associated with this object, and various methods useful for modifying it.

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

+1
source

Understanding pure JavaScript will first become your first goal and find out how objects are defined there. I recommend JavaScript: the ultimate David Flanagan guide .

After understanding the JS model, you can begin to search under the hood of jQuery and understand what is being done. jQuery just uses JavaScript to make it easier to use: http://www.learningjquery.com/2008/12/peeling-away-the-jquery-wrapper

+1
source

jQuery is mainly used through "selectors". Basically, a selector is just a way to encapsulate any HTML elements matching your request. Once you have these elements, jQuery can help you do all kinds of things with them.

I highly recommend bookmarking (or loading an AIR application) the jQuery API , as it will greatly help to know what your selectors can do.

Hope this helps.

0
source

Source: https://habr.com/ru/post/1309348/


All Articles