jQuery Other events


$("Element").load(type, function)

Binds a handler to the element, which is called automatically when the element is loaded. Just like writing jQuery every time you write jQuery, $(document) .reday() or $ the same way.
Type: Event type
Function: Function body


$("Element").unload(function)

In contrast to the above function, bind a handler function in the unload event of each matching element. For example, when the page unloads an alert box pops up. $(Document) .unload(function() {alert("Bye now!");});


$("Element").resize(function)

When the window size changes, such as $(window) .resize(function() {alert("You are trying to change the size of the window");


$("Element").scroll(function)

$(Window) .scroll(function() {alert("You are trying to change the scroll bar");}); When the scroll bar is changed,


$("Element").select()

Triggers a select event for each matching element, which invokes all functions that perform binding to the select event, including the browser's default behavior. For example, to trigger all the input element of the select event, $("input").


$("Element").select(function)

The select event is fired when the user selects a piece of text in a text box, including input and textarea.


$("Element").submit()

The function invokes execution of all functions bound to the submit event, including the browser's default behavior. You can prevent the default behavior of the browser from being triggered by returning false in a bound function. $("Form: first").submit(); that the first form submitted by the trigger.


$("Element").submit(function)

Bind a handler to the submit event of each matching element.


$("Element").error()

This function will invoke all functions bound to the error event, including the browser's default behavior on the corresponding element. You can prevent the default behavior of the browser from being triggered by returning false in a bound function. An error event can usually be triggered when the element loses focus due to a click or tab navigation.


$("Element").error(function)

For the error event, there is no public standard. In most browsers, the window object triggers the error event when an error occurs on the page's JavaScript, and an image object's error event is fired when the image's src property is invalid, such as when the file does not exist or the image data is corrupted.




Copyright 2014-2017 by DeveloperTut.com. All Rights Reserved.
TwitterGoogle+Facebook