Popup full view doesn't require any javascript libraries
JavaScript HTML CSS
Pull request Compare This branch is 2 commits behind tedshd:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
javascript
README.md
index.html

README.md

popup_view

Intro

This is popup view.

Feature

  • Use CSS3
  • Does not require other JavaScript libraries
  • Only support IE10 up

Method

  • show(dom, show, hide)

    • dom[object] - popup you want show
    • show[function] - do something went popup show
    • hide[function] - do something went popup hide
  • hide(dom, hide)

    • dom[object] - popup you want hide
    • hide[function] - do something went popup hide

Usage

HTML

<!-- basic popup view structure -->
<div class="pop_up popup_hide">
    <div class="pop_up_close"></div>
</div>

JavaScript

var popupView = new popup();

popupView.show(document.querySelector('#popup_1'));
var popupView = new popup();

popupView.show(document.querySelector('#popup_2'), function () {
    console.log('show do something');
});
var popupView = new popup();

popupView.show(document.querySelector('#popup_3'), '', function () {
    console.log('CLOSE');
});