1.0.1 • Published 7 years ago
konstruct-reveal v1.0.1
Konstruct Reveal 1.0.1
A tiny CommonJS Jquery script that allows you to show & hide elements through their ids.
Install
First install the script as a dependency with NPM:
npm install --save konstruct-reveal
Then require sensor in your script:
var Reveal = require('konstruct-reveal')
Call the Reveal();
function.
Usage
Sensor works by passing it objects to listen and act on. There are two main actions you can perform at the moment:
<a href="#the-div" class="c-reveal">Show/hide the div below</a>
<div class="c-hidden" id="the-div">I am the div</div>
The script will attach c-open
class to the target, so you can style that anyways you want.