lesca-click
TypeScript icon, indicating that this package has built-in type declarations

4.3.5 • Public • Published

React React React React React NPM React NPM

Why use it?

use for prevent browser default behavior. usually used in web without scroll app.

Installation

$ npm install lesca-click --save

Demo

Live Demo

Usage

import Click from 'lesca-click';

Click.install();

Click.add('.target', (e) => {
  console.log('target clicked');
});

// find single className only
<div class='target'> // good
<div class='target on'> // bed

Methods

method options type description default
.install() install true
add(target, execution) target string selector => ".target" or "#target"
execution function call when target clicked
remove(target) target string selector => ".target" or "#target"
clear() clear all functions
setPreventDefault(value) value boolean set preventDefault enable or disable
addPreventExcept(target) target string ".target" or "#target"

Features

  • maintain if necessary

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.3.52latest

Version History

VersionDownloads (Last 7 Days)Published
4.3.52
4.3.40
4.3.31
4.3.20
4.3.10
4.3.00
4.2.20
4.2.10
4.2.00
4.1.10
4.1.00
4.0.40
4.0.30
4.0.20
4.0.10
4.0.00
3.0.00
2.1.00
2.0.10
2.0.00
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i lesca-click

Weekly Downloads

3

Version

4.3.5

License

MIT

Unpacked Size

355 kB

Total Files

33

Last publish

Collaborators

  • jameshsu1125