Fixed typos and whitespace in jQuery selectors (#22053)
On line 8: "an function" changed to "a function" On line 83 & 84: "on the dom" changed to "in the dom" On line 89 & 97: removed whitespace in jQuery selectors
This commit is contained in:
@ -5,6 +5,7 @@ title: Click Method
|
|||||||
# Click Method
|
# Click Method
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The jQuery Click method triggers a function when an element is clicked. The function is known as a "handler" because it handles the click event. Functions can
|
The jQuery Click method triggers a function when an element is clicked. The function is known as a "handler" because it handles the click event. Functions can
|
||||||
impact the HTML element that is bound to the click using the jQuery Click method, or they can change something else entirely. The most-used form is:
|
impact the HTML element that is bound to the click using the jQuery Click method, or they can change something else entirely. The most-used form is:
|
||||||
|
|
||||||
@ -80,8 +81,8 @@ Also you should prefer to use .on('click',...) over .click(...) because the form
|
|||||||
|
|
||||||
#### Common Mistakes
|
#### Common Mistakes
|
||||||
|
|
||||||
The click event is only bound to elements currently on the DOM at the time of binding, so any elements added afterwards will not be bound. To bind all
|
The click event is only bound to elements currently in the DOM at the time of binding, so any elements added afterwards will not be bound. To bind all
|
||||||
elements on the DOM, even if they will be created at a later time, use the `.on()` method.
|
elements in the DOM, even if they will be created at a later time, use the `.on()` method.
|
||||||
|
|
||||||
For example, this click method example:
|
For example, this click method example:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user