Skip to content

alejandromur/pop-it

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pop-it

Pop-it. A(nother) simple Vanilla JavaScript plugin that launch a pop up box where place your message. No jQuery is needed. No pretentions, just for fun.

Demo

Demo 1 | Demo 2 | Demo 3 | Demo 4

Usage

• Download or fork the repository.

• Include the CSS & Javascript file minify or not in your HTML.

• Place your message in the DOM's .u-modal container using its structure. (See the different demos where you could find a simple or double column structure.

• Initialize your modal box.

var modal = new Popit();

• Remember you can customize some features

var modal = new Popit({
        auto: false, 
        veil: "disabled"
    });

Options

auto true/false launches the modal box automatically
veil "active"/"disabled" makes the outer veil available to attach an event to close de modal box

• Transitions are made with CSS

• CSS BEM convetion classes

• CSS classes are namespaced under u- prefix in order to avoid strange behaviours with your own CSS

Final thoughts

Please, take this Demo as it is, and feel free to download, modify, break, use or destroy this code.

About

A simple Vanilla JavaScript plugin that launches a modal box where place your message

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages