jquery Advanced Learning Notes

Source: Internet
Author: User

--jquery and native JS can coexist, but cannot be mixed. jquery can be converted to native JS by the Get () method.

$ ("#div1"). Get (0). InnerHTML;

Get () needs to pass a parameter, which means get the first few, if not passed, the default represents a set of elements

The difference between--outerwidth () and offsetwidth

Normally, the values obtained by Outerwidth offsetwidth are Width+padding+border

Outerwidth (True) Gets the value of Width+padding+border+margin

Offsetwidth gets the value of the hidden element, Outerwidth can

--html () and text ()

$ (' div '). html () will only get to the first Div

$ (' div '). Text () back gets to all div

--removed () and detached ()

Removed () deletes the element and all previous operations, and the return value is the delete element itself

Detach () only deletes the element, but retains the action, and the return value is the delete element itself

--$ (function () {}) and Window.onload=function () {}

$ () executes as soon as the DOM load is complete

Window.onload requires the entire page to be loaded complete before execution

--parents () and closest ()

Parents () Gets all ancestor nodes of the current element, which is the filter function

Closest () Gets the nearest ancestor node of the current element (including itself), must write the filtered parameters, only one element can be found

--stop ()

Stop () defaults to stop (False,false), which only blocks the current motion

Stop (true) prevents subsequent motion

Stop (ture,true) to make the current motion immediately to the target point

Finish () to make the motion immediately stop at the target point

jquery Advanced Learning Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.