. netdom operation--un

Source: Internet
Author: User

DOM Operations
To manipulate related elements:
In: Children (), find ("selector")
Outside: parent (), parents ("selector")
Next: Next (), Nextall (selector)
On: Prev (), Prevall ("selector")

Attaching: Collection Operations
First (), Last (), EQ (n)

adding, copying, replacing, and removing elements
Added: Append (Element Object), Prepend (Element Object), after (element object), before (element object)
Copy: Clone ()
To remove:
Empty empty ()-preserves the outer elements and clears all elements and contents.
Remove Remove ()-Removes all elements.
Replace:

Events and animations
First, the incident
1. In JavaScript syntax, the events in the onxxxxx are removed, which is the event in jquery.
Onclick-click
Ondblclick-dblclick

Onmouseover-mouseover
Onmouseout-mouseout

Onfocus-focus
Onblur-blur

Onchange-change

Onkeydown-keydown
Onkeyup-keyup
Onkeypress-keypress

2. Unique Events:
Hover (function () {},function () {}): the equivalent of combining mouseover and mouseout
Toggle (function () {},function () {},... function () {}): Executes the next function per click, as executed to the end, and returns the first execution


Event in 3.JQuery, requires the event's parentheses to write function () {}
$ ("#Button1"). Click (function () {
Event handling code
});

Case:
1. Light Stick Effect: mouseover,mouseout
2. Expand the Panel: click

Second, the animation
Hide (), show ()
FadeIn (), FadeOut ()
Slideup (), Slidedown ()

Slideup ([Number of milliseconds],[callback function])
Slideup (3000,function () {xxx ();})

Animate ({left: "500px"},3000,function () {/* callback function */})
Stop (Bool,bool);
First argument: Whether to empty the previous animation sequence.
Second parameter: Go straight to the last state.

. netdom operation--un

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.