1.remove and empty
<div id= "Div1" > <ul id= "UL1" > <li> hehe </li> </ul></div>
$ (' #div1 '). empty (); When calling the empty method, only the child elements in the Div are cleared, and the DIV remains in the document;
$ (' #div1 '). Remove (); When you call the Remove method, the entire DIV element is removed (including itself), and all the elements inside the Div and Div are all removed from the document.
2. The difference between the 8 methods of inserting a node
Inserts a node into the interior of the specified element: Append, AppendTo, prepend, Prependto.
Inserts a node to the outside of the specified element: After, InsertAfter, before, InsertBefore.
3. Four ways to bind events
Bind, on, Live, delegate, corresponding to the function of lifting the listener are unbind, die, undelegate, off.
4. Advantages of Event Delegation
Take advantage of the principle of event bubbling.
① automatically adds events to subsequent dynamically generated elements.
The ② event is bound on an element and delegated to multiple elements, improving the performance of the program.
5.
Block bubbling: event.stoppropagation
Block default: Prevendefault
Block bubbling and default: return False
6. Coordinate values of the mouse
E.screenx (Y): The distance to the upper-left corner of the computer screen, ignoring the browser's zoom and scroll bars.
E.pagex (Y): The distance to the upper-left corner of the document, which is affected by the size of the browser and is not affected by the scroll bar.
E.clientx (Y): The distance to the upper-left corner of the browser's visible area, which is worth the size affected by the browser zoom and ScrollBar.
A partial summary after learning jquery