jQuery - jQuery objects and DOM objects

1.jQuery distinguish objects and DOM objects

  • JQuery through the object after packaging method, is a class array object . It is the DOM object is completely different, the only similarity is that they can operate DOM.
  • JQuery through the DOM operations, allowing developers to focus more on developing business logic without having to know which specific DOM node we have those, do not need to worry about compatibility issues with different browsers, API we were provided by jQuery development, the code will be more fine short.

The object is converted into a DOM object 2.jQuery

  • Under the subject embodiment using an array: the array using a target mode read in jQuery DOM object, an indexed array is zero, i.e. the first element index is 0
  • JQuery comes through get () method: jQuery object itself provides a .get () method allows us direct access to the DOM node associated with the jQuery object, get a method of providing an index of elements

JQuery object transformed into an object 3.DOM

  • Following the adoption $ (dom) method will be processed into ordinary objects dom jQuery object, we can call the method of the jQuery

Guess you like

Origin www.cnblogs.com/songsongblue/p/11707325.html