Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 1.1 KB

README.md

File metadata and controls

46 lines (37 loc) · 1.1 KB

Dom Outline

Firebug/Dev Tools-like DOM outline implementation using jQuery.

Example Usage

var myExampleClickHandler = function (element) { console.log('Clicked element:', element); }
var myDomOutline = DomOutline({ onClick: myExampleClickHandler });

// Start outline:
myDomOutline.start();

// Stop outline (also stopped on escape/backspace/delete keys):
myDomOutline.stop();

Options

Option Description Default
borderWidth The width of the outline border, in pixels. 2
onClick The function fired when the user clicks while the DOM outline is active. Receives the target element as an argument. false
namespace The private namespace used for CSS selectors and events. Available in the unlikely event of possible event/CSS collisions. 'DomOutline'

Other Notes

  • Tested to work in Chrome, FF, Safari. Buggy in IE ;(
  • Creates a single global variable: window.DomOutline