JQuery self-study notes-3

Source: Internet
Author: User
JQuery syntax example $ (this). hide () demonstrates the jQueryhide () function to hide the current HTML element. $ (& Quot; # test & quot;). hide () demonstrates the jQueryhide () function to hide the elements of id & quot; test & quot. $ (& Quot; p & quot ;). hide () demonstrates the jQueryhide () function jQuery syntax instance $ (this ). hide () demonstrates the jQuery hide () function to hide the current HTML element. $ ("# Test"). hide () demonstrates the jQuery hide () function to hide the element id = "test. $ ("P"). hide () demonstrates the jQuery hide () function to hide all

Element. $ (". Test"). hide () demonstrates the jQuery hide () function to hide all the elements of class = "test. JQuery syntax is compiled for the selection of HTML elements. You can perform some operations on the elements. The basic syntax is: $ (selector ). the $ action () symbol defines the jQuery selector "Query" and "search" the action () of the HTML element jQuery to execute the operation example for the element $ (this ). hide ()-hide the current element $ ("p "). hide ()-hide all paragraphs $ ("p. test "). hide ()-hide all paragraphs of class = "test" $ ("# test "). hide ()-hide all element document readiness functions with id = "test". You may have noticed that all jQuery functions in our instance are in a document ready function: $ (document ). ready (function () {--- jQuery functions go here ----}); this prevents the document from running jQuery code before it is fully loaded (ready. If you run the function before the document is fully loaded, the operation may fail. The following two examples show how to hide a non-existent element to obtain the size of an incomplete loaded image.

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.