jQuery one() Method (original) (raw)

Last Updated : 11 Jul, 2025

The **jQuery one() method is an inbuilt method that attaches one or more event handlers for the selected element. This also attaches a function to run when the event occurs. This method is named one because whatever event handler attaches to this method will run only once.

**Syntax:

$(selector).one(event, data, function)

**Parameter:

This method accepts three parameters as mentioned above and described below:

**Return Value:

This method returns the selected element with the specified event handler.

**Example 1: This example illustrates the use of one() method.

HTML `