Skip to content

Super simple jQuery plugin for hiding or showing HTML DOM element with link

License

Notifications You must be signed in to change notification settings

SupportBee/simplehide.js

 
 

Repository files navigation

Build Status

simplehide.js plugin development template

It's lightweight and super simple JQuery plugin for showing/hiding any HTML DOM elements using jquery.hide() function.

DEMO

HERE

Demo gif

Install

Install simplehide.js with npm:

$ npm install simplehide-js

Then include it in your HTML:

<script src="/node_modules/simplehide-js/simplehide.min.js"></script>

or with Webpack:

require('simplehide-js');

Use

$('#someIndex').simplehide();

$('customHTMLTag').simplehide();

$('.customClass').simplehide();

As I mentioned is super simple. Now those elements will be hidden and (by default) Show.... link will be displayed instead. You can change link text by calling simplehide() with options:

$('#someIndex').simplehide({
  showLink: '<a href="#">Versions...</a>'
});

Contributing

Feel free to post any pull request.

Building

Run

$ npm run build

or

$ gulp compress

to build minified, unglified file.

Testing

Run

$ npm run test

to test all possibile functions.

Licence

MIT. © Rafal Woloszyn

Please see LICENSE file in master branch.

About

Super simple jQuery plugin for hiding or showing HTML DOM element with link

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 86.5%
  • HTML 13.5%