123 of jquery

Source: Internet
Author: User

When I recently read the sharp jquery (second edition), I found that some of the places were inconsistent with the jquery3.2.0 version, so they were sorted out for later inspection.

1.toggle: In the second chapter of the jquery selector case, the toggle method in jquery can add a set of interactive events to a button, but when I follow the copy of the book, I find that the button disappears immediately after the page is loaded. When the surprise query jqueryapihttp://jquery.cuishifeng.cn/found that the toggle method has changed,. Toggle (function, function, ...) The method has been removed in version 1.9 (why was it deleted?) Very good! ), the current toggle method is such a drop:

Toggle ([SPPED],[EASING],[FN])

Used to bind two or more event handler functions in response to a rotating click event of the selected element. If the element is visible, toggle to hidden, or toggle to visible if the element is hidden. Please refer to http://jquery.cuishifeng.cn/toggle.html for details.

2. Creating nodes: In the section on creating nodes, it is particularly important to note that when creating a single element, you should pay attention to closing the label and using the standard XHTML format. For example, create a <P> element that can be used $ (' <p/> ') or $ (' <p><P/> '), but do not use $ (' <P> ') or uppercase $ (' <P/> '), But when I'm working on the ground, I find that $ (' <P> ') and $ (' <P/> ') can also create new nodes . So, $ (' <p/> '), $ (' <p><P/> '), $ (' <P> ') and $ (' <P/> ') are all possible to create a new node. But it is recommended to use $ (' <p/> ') and $ (' <p><P/> '), after all, for the benefit of reading! (0.0);

123 of jquery

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.