jquery.sizespy
v0.2.0
Published
Renders debug span on matching elements with information about current size
Readme
Quick Start
Include jquery.sizespy.js or jquery.sizespy.min.js into your site and call
$('.your-selector, p.other-selector').sizeSpy();Options
stringcssPrefix - change css prefix of generated elementsstringspanTarget - target element of debug span. Regular CSS selector, 'wrap' will wrap matching elements. Default is falseobjectspanStyles - change/adjust CSS style of created debug span, options are merged.objectcontainerStyles - change/adjust CSS style of created container div, options are merged.objecttargetStyles - change/adjust CSS style of observed element, options are merged.
Default Values
spanTarget: false,
spanStyles: {
"position": "absolute",
"left": "0",
"top": "0",
"background-color": "red",
"color": "white",
"padding": "3px 6px",
"font-family": "sans-serif",
"font-weight": "bold",
"z-index": "99999"
},
containerStyles: {
"outline": "1px dashed red"
},
targetStyles: {
"position": "relative"
}