Skip to content

An extremely simple modal box / lightbox / popup box. No dependency. Supports IE10+.

License

Notifications You must be signed in to change notification settings

fionnachan/popupBox.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

popupBox.js

An extremely simple modal box / lightbox / popup box. No dependency. Supports IE10+.

[popupBox.js Demo on fionnachan.github.io] (http://fionnachan.github.io/popupbox.html)

[popupBox.js Demo on CodePen] (http://codepen.io/fionnachan/pen/EyGqbR)

####Please use id but not class as the selector.

$_('#popup1').init({
  'linkName' : '#tnc',
  'openDelay' : 300,
  'closeDelay' : 300,
  'scrollContent' : true,
  'beforeOpen' : function() {
    document.querySelector('body').style.backgroundColor = "#a1c3e5";
  },
  'afterOpen' : function() {
    document.querySelector('body').style.backgroundColor = "#0000ff";
  },
  'beforeClose' : function() {
    document.querySelector('body').style.backgroundColor = "#000000";
  },
  'afterClose' : function() {
    document.querySelector('body').style.backgroundColor = "#ffffff";
  }
});

About

An extremely simple modal box / lightbox / popup box. No dependency. Supports IE10+.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published