Attach elements onto their target
npm install bullseye --save
bower install bullseye --save
Position el
according to the current position of target
. If the tracking
option isn't set to false
, a listener for window resize events will make sure el
stays well-position when the viewport size changes.
When you call bullseye(el, target, options?)
, you'll get back a tiny API to interact with the instance.
In order to play well with friends, bullseye won't change the position
CSS property, but instead leaves it up to you to set the appropriate position
value on el
. This way, we don't make it hard for you to set a different position
value when you need to.
You can set a caret
option to true
so that the tracked position will be right below the text selection caret instead of the entire element.
Refreshes position of el
according to the current position of target
.
Removes the resize
event listener. Note that further calls to .refresh
will throw exceptions.
MIT