Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Generate overlays over DOM elements.
JavaScript
tag: 0.0.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
.gitignore
History.md
Makefile
Readme.md
component.json
index.js

Readme.md

Overlay

Overlays for individual DOM elements.

Installation

$ component install timoxley/overlay

Example

var domify = require('component-domify')
var overlay = require('overlay')
var overlayEl = domify('<div class="overlay"><i class="icon icon-pencil"></i></div>')[0]

var elementSelector = ElementSelector({
  selector: "#container *"
}).on('highlight', function(el) {
  overlay(el, overlayEl).show() // create overlay
}).on('dehighlight', function(el) {
  overlay(el).hide() // hide overlay
})

Demo

License

MIT

Something went wrong with that request. Please try again.