#CoverPop-cover
is used on the full window cover.
By default, a click on any element with .CoverPop-close
will close the popup. CoverPop adds preventDefault()
to elements with this class.
If you wish to continue with the default action, but also hide the popup, add .CoverPop-close-go
. This is particularly useful for form submissions that are sent to another page.
12345678910111213141516171819 | <body> <!– your site’s markup –> <!– start popup –> <div id=“CoverPop-cover“ class=“splash“> <div class=“CoverPop-content splash-center“> <!– the popup content (form, welcome message, etc.) –> <a class=“CoverPop-close“ href=“#“>or skip signup</a> </div><!–end .splash-center –> </div><!–end .splash –> <!– end popup –> <!– js, etc. –> </body> |
Include the plugin css file:
1 | <link rel=“stylesheet“ href=“css/CoverPop.css“> |
CoverPop does not use jQuery, so the only file that needs to be included is CoverPop.js
.
Start CoverPop with the default settings: