Skip to content
Generate overlays over DOM elements. http://timoxley.github.io/overlay/examples/lorem.html
JavaScript
Find file
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.