🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

js-tap

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

js-tap

a tap plugin

unpublished
latest
Source
npmnpm
Version
1.2.4
Version published
Maintainers
1
Created
Source

tap npm

a tap plugin

Install

$ npm install --save js-tap

Usage

var tap = require('js-tap');

//直接调用
tap('.test',function(){
  console.log(this);
})

//事件委托
tap(document,'.test',function(){
  console.log(this);
})

//阻止事件冒泡/默认动作
tap('.test',function(e){
  e.stopPropagation();
  e.preventDefault();
})

//同时指定多个事件
tap(document,{
 '.el1':function(){
   //事件1
 },
 '.el2':function(){
  //事件2
 },
 '.el3':function(){
  //事件3
 }
})

Demo

demo page

Keywords

tap

FAQs

Package last updated on 24 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts