JQuery self-study notes-5

Source: Internet
Author: User

The jQuery event Method triggers an event that matches an element, or binds a function to an event of all matching elements. Trigger instance: $ ("button # demo"). click () the above example triggers the click Event of the button element of id = "demo. Bind an instance: $ ("button # demo "). click (function () {$ ("img "). hide ()}) the above example hides all images when you click the id = "demo" button. Method description bind () attaches one or more event processor blur () to the matching element to trigger, or binds the function to the blur event change () of the specified Element () trigger, or bind the function to the change event click () trigger of the specified element, or bind the function to the click Event dblclick () of the specified Element () trigger or bind the function to the double click event delegate () of the specified element to attach one or more event processor die () to the current or future child elements of the matching element () remove all event handlers added using the live () function. Error () is triggered, or the function is bound to the error event. isdefapreprevented () of the specified element to return whether event. preventDefault () is called on the event object (). The cursor position of event. pageX relative to the left edge of the document. The cursor position of event. pageY relative to the top edge of the document. Event. preventDefault () blocks the default action of an event. Event. result contains the last value returned by the event processor triggered by the specified event. Event.tar get the DOM element that triggers the event. Event. timeStamp this attribute returns the number of milliseconds from January 1, January 1, 1970 to when the event occurred. Event. type describes the event type. Event. which indicates which key or button is pressed. The focus () trigger, or bind the function to the keydown () trigger of the focus event of the specified element, or bind the function to the key down event keypress () of the specified element () trigger, or bind the function to the key press event keyup () of the specified element to trigger, or bind the function to the key up event live () of the specified element () add one or more event processor load () triggers for the current or future matching element, or bind the function to the specified Element's load event mousedown () trigger, bind the function to the mouse down event mouseenter () of the specified element to trigger, or bind the function to the mouse enter event mouseleave () of the specified element () trigger, or bind the function to the mouse leave event mousemove () of the specified element to trigger, or bind the function to the mouse move event mouseout () of the specified element () trigger or bind the function to the mouse of the specified Element The out event is triggered by mouseover (), or the mouse over event mouseup () that binds the function to a specified element, or the mouse up event one () that binds the function to a specified element () add an event processor to the matching element. Each element can only trigger this processor once. Ready () Document readiness event (when the HTML document is ready for use) resize () trigger, or bind the function to the resize event scroll () of the specified Element () trigger, or bind the function to the scroll event of the specified element to trigger, or bind the function to the select event submit () of the specified element () trigger or bind the function to the toggle () submit event of the specified element to bind two or more event processor functions, which are executed in turn when a click event occurs. Trigger () All specified events that match the element triggerHandler () The first specified event unbind () of the matched element removes an added event processor undelegate () from the Matching Element () remove an added event processor from the Matching Element, trigger unload () now or in the future, or bind the function to the unload event of the specified element.

Related Article

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.