The click() method is used to simulate the mouse click on an element. This method works exactly the same as the element is manually clicked.
Parameters: No parameters required.
Return Value: No return value.
Example: In this example, when the cursor goes over the radio button, it’ll execute the mouse click event and the radio button is checked as it is clicked manually.
Before hovering on the radio button:
After hovering on the radio button:
Supported Browsers: The browser supported by DOM click() Method are listed below:
- Google Chrome
- Internet Explorer
- AngularJS | ng-click Directive
- How to add many functions in one ng-click directive?
- How to click anywhere on the page except one element using jQuery ?
- What is the use of a double-click event in AngularJs?
- How to call PHP function on the click of a Button ?
- How to add a pressed effect on button click in CSS?
- How to remove focus around buttons on click?
- How to remove active nav-tab when click outside of nav-tab in Bootstrap ?
- How to click a button on webpage using selenium ?
- How to bind 'touchstart' and 'click' events but not respond to both ?
- How to distinguish left and right mouse click using jQuery?
- How to get the coordinates of a mouse click on a canvas element ?