Home >Web Front-end >JS Tutorial >jQuery: The use and definition of mouseup event

jQuery: The use and definition of mouseup event

黄舟
黄舟Original
2017-06-28 14:23:241204browse

Overview

Bind a processing function to the mouseup event of each matching element.

The mouseup event will be released when the mouse clicks on the object

Parameters

fnFunctionV1.0

In the mouseup of each matching element The handler function bound to the event.

[data],fnString,FunctionV1.4.3

data:mouseup([Data], fn) data can be passed in for function fn to process.

fn: The handler function bound in the mouseup event of each matching element.

Example

Description:

Hide or show an element when the mouse button is released:

jQuery Code:

$("button").mouseup(function(){ $("p").slideToggle(); })

Example

Hide or show the element when the mouse button is released:

$("button").mouseup(function(){
  $("p").slideToggle();
});

Definition and usage

When on the element The mouseup event occurs when the mouse button is released.

Unlike the click event, the mouseup event only requires the button to be released. This event is fired when the mouse button is released when the mouse pointer is over the element.

The mouseup() method triggers the mouseup event, or specifies a function to run when the mouseup event occurs.

Trigger the mouseup event

Syntax

$(selector).mouseup()

Bind the function to the mouseup event

Syntax

$(selector).mouseup(function)

Parameters Description

function Optional. Specifies a function to run when a mouseup event occurs.

The above is the detailed content of jQuery: The use and definition of mouseup event. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn