element-picker

A JavaScript library that allows you to point and click to get the hovered element.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
element-picker
1.0.15 years ago5 years agoMinified + gzip package size for element-picker in KB

Readme

A JavaScript library to help you point and click to get the hovered element.

Install

npm install --save element-picker

Usage

var elementPicker = require('element-picker')

function onClick(element) {
  console.log(element)
}

elementPicker.init({ onClick })

Options

backgroundColor {String} optional default='rgba(0, 0, 0, 0.1)'

The background color used when an element is being hovered.

License

MIT. Copyright (C) James Bechet.