Skip to content

wabish/jquery.nail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jquery.nail

A jQuery plugin that enables a label to be nailed in the loacation you want.

Installing with NPM

$ npm install jquery.nail --save

Installing with Bower

$ bower install jquery.nail --save

Demo

http://wabish.github.io/jquery.nail/

Browser Support

Chrome Firefox Safari

How to use

Simply include the jquery.nail.min.js file and place the following in the head of your document (make sure jQuery is included).

Minimum setup

$(function() {
  $('#box').nail();
});

Example with default options

$(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');
    }
  });
});

License

This plugin is available under the MIT license.

About

A simple jQuery nail plugin.

Resources

License

Stars

Watchers

Forks

Packages

No packages published