1.0.2 • Published 7 years ago

ct-pop-up v1.0.2

Weekly downloads
6
License
ISC
Repository
github
Last release
7 years ago

pop-up

In order for this plugin to work in older browsers, includ webcomponents.js plugin   https://github.com/webcomponents/webcomponentsjs

How to use it

1. Include css file in header of the page

<link rel="stylesheet" href="build/ct-pop-up.min.css">

2. Include js file in footer of the page

<script src="build/ct-pop-up.min.js"></script>

3. Using in html

<pop-up data-id="example2">
    <pop-up-content>
        <div class="p-header">
            Welcom to my site!
            <pop-up-close></pop-up-close>
        </div>
        <div class="p-body">
            <div>
                Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi vitae nisi libero cupiditate alias quam dignissimos quas corporis aspernatur, deleniti, quo modi dicta itaque. Voluptates perspiciatis totam ea quae eius.
            </div>
            <div>
                <pop-up-close>Close</pop-up-close>
            </div>
        </div>
    </pop-up-content>
</pop-up>

<pop-up-open data-id="example">Open Pop-Up</pop-up-open>

Methods

  • open(callback) - Opening pop-up
  • close(callback) - Closed pop-up

Events

  • open - called when pop-up open
  • close - called when pop-up close

Attributes

  • data-id - pop-up id-required

Global functions

  • closeLastOpenPopUp() - Closed last opening pop-up
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago