A jQuery plugin that enables a label to be nailed in the loacation you want.
$ npm install jquery.nail --save
$ bower install jquery.nail --save
http://wabish.github.io/jquery.nail/
Chrome
Firefox
Safari
Simply include the jquery.nail.min.js
file and place the following in the head of your document (make sure jQuery is included).
$(function() {
$('#box').nail();
});
$(function() {
$('#box').nail({
onTop: function(elem) {
elem.css('background', '#869EB5');
},
onBottom: function(elem) {
elem.css('background', 'rgb(34, 89, 58)');
},
onFixed: function(elem) {
elem.css('background', '#000');
}
});
});
This plugin is available under the MIT license.