Javatpoint Logo
Javatpoint Logo

jQuery mousedown()

The mousedown() method adds an event handler function to an HTML element. This function is executed, when the left mouse button is pressed down, at the time while the mouse is over the HTML element.

This event is generally used together with mouseup() event.

Syntax:

It triggers the mousedown event for selected elements.

It adds a function to the mousedown event.

Parameters of jQuery mousedown() event

Parameter Description
Function It is an optional parameter. It executes itself when the mousedown event is triggered.

Example of jQuery mousedown() event

Let's take an example to demonstrate jQuery mousedown() event.

Test it Now

Output:

Enter this heading.


jQuery mousedown() event example 2

Let's see another example of jQuery mousedown() event.

Test it Now

Output:

Press down the mouse left button over this p element

Next TopicjQuery mouseup()




Let's Work Together!

Javatpoint is passionate to offer better content to the world. Please mail your contribution to contribute@javatpoint.com. We will show your name and create your user profile. You can contribute the following things:
  • Article on Any Topic (which is not available on Javatpoint)
  • Your Interview Experience on Company
  • Company Interview Questions with Answers
  • Recruitment Process of Company
  • Programs, and Algorithm
  • Videos
  • Test Paper
  • Improve Article

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials