1. Hello
  2. Overview
  3. The structure
  4. Quick install
  5. Plugin options
  6. Faq
  7. Tricks and tips
  8. Notes
  9. Support

Slick Modal - HTML5 and CSS3 modal popups

Documentation


Thank you for choosing Slick Modals

Before you get started i suggest you read the documentation and incase you have an issue or you need help, feel free to contact me via email or PM on Codecanyon.

Overview


Slick Modal are HTML5 and CSS3 popups, which are ment to be easely implementated into almoust any website or CMS system with some basic knowledge of HTML, CSS and/or server side scripting.
It is a framework for easy installation, customization and development. It is not a CMS plugin, module or widget hence it needs to be installed manually. Slick Modals does not contain premade popup designs, it is a layout/framework popup for your custom popup design/s for static websites or dynamic (CMS).



1. Supported browsers
Note 1: Slick Modal is tested in browsers, listed above - on PC and partialy MAC. Older browsers (like Internet Explorer 8 and below) or browsers, which don't support CSS3 features in full, will not render the elements, positions and animations correctly.
Note 2: Slick Modal should work on almoust all modern portable devices (IOS and Android based), but it was created and tested to work mainly on desktops and high-res tablets, which support the CSS3 tehniques, used in creating the popup and have higher resolutions.



2. Supported resolutions

Slick Modal is made to be used for popups with fixed dimensions. If you plan to use responsive content, it's best to adapt your content with css media queries. You can also check the responsive demo which servers as a simple guide for you to create your modal content responsive.


3. Package contents
  1. Quick start - includes a single demo for a quick start
  2. Demo layouts - included few basic demo layouts
  3. Documentation
  4. changelog.txt

The structure


Slick Modal popup is made from the html elements which define the layout, CSS for basic layout design and JS plugin, which controls the functionality part of the popup.



1. HTML

The html is very minimal. It consist from unique ID, which is the parent for the window element that holds our popup content inside.


<!-- ========== START COPYING HERE ========== -->
	<div id="popup-1" class="slickModal">
		<div class="window">
			<!-- Your popup content -->
			... your content goes here ...
			<!-- / Your popup content -->
		</div>
	</div>
<!-- ========== END COPYING HERE ========== -->


2. CSS

The CSS is made for basic popup styling and layout functionlities. It can be modified if needed but most of our styling here is just a basic fallback if none of the jQuery plugin options are selected. The CSS structure is made from:

3. jQuery plugin

As mentioned jQuery plugin controls the functionality part of the popup. We invoke/call our options right inside the js file. Below is an example of a simple popup:


// Plugin invoke
$(document).ready(function () {
    $("#ourPopup-1").slickModals({
        popupType: "scroll",
        delayTime: 1000,
        exitTopDistance: 40,
        scrollTopDistance: 400,
        setCookie: false,
        cookieDays: null,
        cookieTriggerClass: "",
        cookieName: "",

        // Overlay options
        overlayBg: false,
        overlayBgColor: "",
        overlayTransition: "",
        overlayTransitionSpeed: "",

        // Background effects
        bgEffect: "scale",
        blurBgRadius: "2px",
        scaleBgValue: "0.9",

        // Window options
        windowWidth: "480px",
        windowHeight: "250px",
        windowLocation: "center",
        windowTransition: "ease",
        windowTransitionSpeed: "0.4",
        windowTransitionEffect: "zoomIn",
        windowShadowOffsetX: "0",
        windowShadowOffsetY: "0",
        windowShadowBlurRadius: "20px",
        windowShadowSpreadRadius: "0",
        windowShadowColor: "rgba(0,0,0,0.3)",
        windowBackground: "rgba(255,255,255,1)",
        windowRadius: "12px",
        windowMargin: "auto",
        windowPadding: "30px",

        // Close and reopen button
        closeButton: "icon",
        reopenClass: "openSlickModal-1",
    });
});

Quick Installation


In order to install Slick Modal popup into your html page, follow these few simple steps:

1. COPY THE HTML ELEMENTS

Open the 1. Quick start folder. Then open index.html document with your favorite text editor.
Once opened in editor, simply select all the code between the main comments ("START COPYING HERE" and "END COPYING HERE") and copy selected code to your document file right before closing </body> tag at the end of your page.


<!-- START COPYING HERE -->
	...
	select all the code between the comments and copy/paste to your document
	...
<!-- / END COPYING HERE -->



Note 1: For Slick Modal popup to work properly, it's best to copy all the code into first level between <body> tags at the bottom of your page right before closing </body> tag. It's not recommended to nest the popup inside other elements, as it might brake the design layout or put the Slick Modal popup behind another element on the page.




2. INSERT YOUR ELEMENTS INSIDE THE HTML

When you have pasted the html code then insert your elements between the "Your popup content" and "/ Your popup content" comments. You can put anything inside it, your Contact form, signup form, video, map... any element.


<!-- ========== START COPYING HERE ========== -->
	<div id="popup-1" class="slickModal">
		<div class="window">
			<!-- Your popup content -->
			... your content goes here ...
			<!-- / Your popup content -->
		</div>
	</div>
<!-- ========== END COPYING HERE ========== -->



Note 1: You can insert any image, iframe, video or element inside the Slick Modals.




3. CALL THE CSS AND JQUERY PLUGIN

Upload Slick Modal css and jquery file into your chosen folder on your webserver or local site. It's recommended that you use minified versions of both files for better performance.
Then call the css and jquery file. Call CSS from the <head> section and if possible call the jquery plugin right before closing </body> tag for better performance. Below is a demo of callings:


	<head>
		...
		<link rel="stylesheet" type="text/css" href="yourPath/sm-minified.css" media="screen" />
		...
	</head>

	<body>
		...
		<script type="text/javascript" src="yourPath/jquery.slick-modals.min.js"></script>
	</body>



Note 1: Be sure to match the path to the files where you have uploaded them.
Note 2: Call the Slick Modal jQuery plugin after you call your jQeury library.




4. ADJUST THE PLUGIN SETTINGS

Open the Slick Modals jQuery plugin file and adjust the settings at the plugin invoke section. Also adjust the main ID selector which will control the modal setup.


// Plugin invoke
$(document).ready(function () {
    ... plugin settings (read more about them below) ...
});



Note 1: You call the plugin invoke inside the Slick Modal JS file. No need to call it again alone within the head or body.




Plugin options


Your popup consist from the options you give it by changing the settings inside the Slick jQuery file.
They give you control of modal's functionality, look and feel. Below is an explanation of all avaliable options:


popupType = Defines your popup type. Avaliable options: delayed, scrolled, exit


delayTime = delay time in miliseconds of delayed popup type. Can be any numerical value.


exitTopDistance = distance in px from the top of window for exit popup type. Can be any numerical value.


scrollTopDistance = distance in px from the top of window for scrolled popup type. Can be any numerical value.


setCookie = defines if the popup will set a cookie and hide it self for a period of time from the user. Possible options are true or false.


cookieDays = defines a number of days for the cookie to be active. Default is null. For session cookie use number 0 and for X period of days give it a desired numerical value.


cookieTriggerClass = a class used to trigger the cookie for each modal when using multiple popups. Classes between multiple popups must not be the same or else for example the cookie from modal A will be set on modal B. Default is setSlickCookie.


cookieName = specify a cookie name for each modal when using multiple popups. Cookie name must be different for each popup. Default is slickCookie.


overlayBg = specify if overlay should be active or not. Possible options are true or false. If you set it to false the modal will have no background overlay.


overlayBgColor = specify the overlay background color. You can insert any RGB or HEX value. In rgba mode last value controls the opacity (default is 0.85).


overlayTransition = specify the overlay transition. You can use linear, ease, ease-in, ease-out, ease-in-out.


overlayTransitionSpeed = specify the overlay transition speed. Can be any decimal numerical value.


bgEffect = defines effect on the page background upon opening a modal. You can set blur, scale, both, null or leave it empty.


blurBgRadius = specify the background blur radius. Can be any numerical value in px.


scaleBgValue = specify the background scale depth. Can be any decimal numerical value. Above 1 it scales up, below 1 scales down.


windowWidth = specify modal window width. Can be any numerical value in px or percentage.


windowHeight = specify modal window height. Can be any numerical value in px or percentage.


windowLocation = specify modal window location on screen. You can use center, topLeft, topCenter, topRight, bottomLeft, bottomCenter, bottomRight, left, right.


windowTransition = specify modal window transition. You can use linear, ease, ease-in, ease-out, ease-in-out.


windowTransitionSpeed = specify modal window transition speed. Can be any decimal numerical value.


windowTransitionEffect = specify modal window transition effect. You can use fade, zoomIn, zoomOut, slideTop, slideBottom, slideLeft, slideRight, rotateIn, rotateOut, flipHorizontal, flipVertical, perspectiveTop, perspectiveBottom, perspectiveLeft, perspectiveRight.


windowShadowOffsetX = specify modal window shadow X offset. Can be any numerical value in px.


windowShadowOffsetY = specify modal window shadow Y offset. Can be any numerical value in px.


windowShadowBlurRadius = specify modal window shadow blur radius. Can be any numerical value in px.


windowShadowSpreadRadius = specify modal window shadow spread radius. Can be any numerical value in px.


windowShadowColor = specify modal window shadow color. Can be any RGBA or HEX value.


windowBackground = specify modal window background color. Can be any RGBA or HEX value.


windowRadius = specify modal window border radius. Can be any numerical value in px.


windowMargin = specify modal window margins. Can be any numerical value in px.


windowPadding = specify modal window inner padding. Can be any numerical value in px.


closeButton = chooses a close icon for modal window. You can use labeled, tag, icon, text.


reopenClass = specify the class to reopen the modal. Use this class in your html element. You can use your own class naming. for each popup separately

Be sure to use avaliable options only (in above specification). See where you need to use quotation marks and specific units (pixels, percentages...). For reference see the setup below:


// Plugin invoke
$(document).ready(function () {
    $("#popup-1").slickModals({
        popupType: "delayed",
        delayTime: 1000,
        exitTopDistance: 40,
        scrollTopDistance: 400,
        setCookie: true,
        cookieDays: 0,
        cookieTriggerClass: "setCookie-1",
        cookieName: "slickModal-1",

        // Overlay options
        overlayBg: true,
        overlayBgColor: "rgba(0,0,0,0.85)",
        overlayTransition: "ease",
        overlayTransitionSpeed: "0.4",

        // Background effects
        bgEffect: "scale",
        blurBgRadius: "2px",
        scaleBgValue: "0.9",

        // Window options
        windowWidth: "500px",
        windowHeight: "300px",
        windowLocation: "bottomRight",
        windowTransition: "ease",
        windowTransitionSpeed: "0.4",
        windowTransitionEffect: "zoomIn",
        windowShadowOffsetX: "0",
        windowShadowOffsetY: "0",
        windowShadowBlurRadius: "20px",
        windowShadowSpreadRadius: "0",
        windowShadowColor: "rgba(0,0,0,0.3)",
        windowBackground: "rgba(255,255,255,1)",
        windowRadius: "12px",
        windowMargin: "30px",
        windowPadding: "30px",

        // Close and reopen button
        closeButton: "icon",
        reopenClass: "openSlickModal-1",
    });
});

Faq


In this section we'll cover few basics with Slick Modal popup and some pointers on How to and Faq.




1. How do i set multiple popups on the page?

In order to have two or more modals you should create two html popup elements with different ID's and call the plugin settings for each of them. For example:

1. HTML
	
<!-- ========== YOUR FIRST POPUP ========== -->
<div id="popup-1" class="slickModal">
	<div class="window">
		<!-- Your popup content -->
		... your content for popup 1 goes here ...
		<!-- / Your popup content -->
	</div>
</div>

<!-- ========== YOUR SECOND POPUP ========== -->
<div id="popup-2" class="slickModal">
	<div class="window">
		<!-- Your popup content -->
		... your content for popup 2 goes here ...
		<!-- / Your popup content -->
	</div>
</div>



2. JQUERY

// Plugin invoke
$(document).ready(function () {
    $("#popup-1").slickModals({
        ... settings for popup 1 ...
    });
    $("#popup-2").slickModals({
        ... settings for popup 2 ...
    });
});

You can also check out the demo inside 2. Demo layouts/7. Multiple popups folder.





2. How do i make popup responsive?

You can specify the popup initial width and height in pixels or percentages and use those values for responsivnes. You can also fine tune it via css media queries. For example - we wish the modal window has a 90% screen width at 480px viewport and smaller:

	
@media screen and (max-width: 480px) {
	.slickModal .window {
		width: 90% !important;
	}
}

Note 1:Note that initial modal size values are inline styles so you have to use !important atribute to your media querie values. More on CSS3 media queries avaliable here. You can also check the demo helper which is located in folder 2. Demo layouts/1. Contact form - responsive. At the bottom of the sm.css you will notice the media queries which serve as breakpoints for changing the layout and it's elements at certain screen sizes. You can target specific viewport width, height, their min/max breakpoints, media types and other settings. Within those rules you can then adjust every element and it's css attributes.





3. We are using a form. How to hide modal on submit?

To hide a modal simply add a class "closeModal" to element that submits the form. For example, if you have input that submits the form you can add a class to it:

	
<input type="submit" class"closeModal-1" value="Submit" />

Note 1: Be sure to define the closing class in the jQuery plugin and use the same class inside your element.





4. I use a promo banner. How can i hide the popup on banner link click?

As mentioned, to hide a modal simply add a class to element you wish (same as the previous answer).




5. I'm using a CMS, how can i install the modal?

Altough Slic Modal is not made as a plugin or module it can still be installed manualy into any CMS. You can follow the quick install guide by editing coresponding CMS template files. Be sure to create backup before manual installation.




6. I'm trying to set topCenter position, but the popup keeps showing on the left

As window is absolutely positioned it needs margin auto in certain locations. You set these values with windowMargin within plugin settings upon invoke. For example:

- TopCenter location needs windowMargin: 0 auto (0 can be any desired value),
- Left / right location also needs windowMargin: 0 auto (0 can be any desired value).




7. I'm having a conflict issue with jQuery and other libraries

Sometimes when using various libraries on the site (like prototype, mootols and others) it might get in conflict with jQuery and the plugin or other script might not work. In that case instead of using jquery.slick-modals.min from js folder you can use noConflict plugin which is located in 1. Quick start/js/noConflict folder.




8. Why is there a 2. Demo layouts folder?

The demos in that folder are for reference and demo purpouses only for your ease of use. You can use them for your own projects, but the support for modifications and extended functionality of those demos is not provided.




9. How do i change the "Close" text on the closing button?

Edit the Slick css and search for content: "Close" with the editors search command if you are using minified Slick css or look for the following selector and change the text inside the content attribute:

.slickModal .close.text:before {
	color: #fff;
	content: "Close";
	font-size: 9px;
	text-transform: uppercase;
}



10. How can i make the overlay to be a background image?

Open the Slick Modal jQuery and add a background url to the overlayBgColor option, like this:

	overlayBgColor: "url('images/bg.jpg') no-repeat center center / cover",

You can also check out the demo inside 2. Demo layouts/8. Background image folder.

Note 1: First value is the background path, second is no-repeat, which prevents the image to repeat. Next is center center which centers the image. And last is cover which stretches the image across the screen.
Note 2: Note the single and double quotes. Single can be outside the string and double inside the url of the background image path.





11. Can i show the modal only on certain pages?

You can do that by wrapping the plugin options inside the Slick Modal jQuery file inside the if statement. As an example below we wrapped the plugin options inside the if statement which will show the popup only on page which contains "yourUrl" string inside the url:

// Plugin invoke
$(document).ready(function () {
    if (window.location.href.indexOf("yourUrl") > -1) {
        $("#popup-1").slickModals({
            // Functionality
            popupType: "delayed",
            delayTime: 1000,
            exitTopDistance: 40,
            scrollTopDistance: 400,
            setCookie: true,
            cookieDays: 0,
            cookieTriggerClass: "setCookie-1",
            cookieName: "slickModal-1",

            // Overlay options
            overlayBg: true,
            overlayBgColor: "rgba(0,0,0,0.85)",
            overlayTransition: "ease",
            overlayTransitionSpeed: "0.4",

            // Background effects
            bgEffect: "scale",
            blurBgRadius: "2px",
            scaleBgValue: "0.9",

            // Window options
            windowWidth: "500px",
            windowHeight: "300px",
            windowLocation: "bottomRight",
            windowTransition: "ease",
            windowTransitionSpeed: "0.4",
            windowTransitionEffect: "zoomIn",
            windowShadowOffsetX: "0",
            windowShadowOffsetY: "0",
            windowShadowBlurRadius: "20px",
            windowShadowSpreadRadius: "0",
            windowShadowColor: "rgba(0,0,0,0.3)",
            windowBackground: "rgba(255,255,255,1)",
            windowRadius: "12px",
            windowMargin: "30px",
            windowPadding: "30px",

            // Close and reopen button
            closeButton: "icon",
            reopenClass: "openSlickModal-1",
        });
    }
});





12. How do i make the popup to be visible only when visitors clicks on certain element?

You can disable the popup's type so it's not delayed, scroll or exit simply by leaving empty quotes in the plugin popupType options like this:

$(document).ready(function () {
    $("#popup-1").slickModals({
        // Functionality
        popupType: "",
        ...
    });
});





13. How do i configure the countdown in the demos?

Countdown in the demos is made by 3rd author. That author provides simple explanation within the plugin comments and on it's website: jCounter which should be fairly easy to setup. Within the plugin you can also change the timezone and translations.

Tricks and tips



1. Don't mix same popup types

In order for popup's to show properly you shouldn't mix popup types when using multiple popups. For example, popup-1 can have a delayed type, but popup-2 should have scrolled or exit type. Keep an eye so that popups don't overlap themselfs.




2. Don't overdo blur or scale effect

Blur & scale are nice effects but they also affect the site performance as it has to redraw all the elements upon firing the animation. So to make your site more user friendly it's recommended to use lower blur and scale values. Optimal is 1-2 px for blur and 0.9 or 1.1 for scale. It's not recommended to use them both simultaneously on the same page as it will reduce the performance of the site dramatically.




3. Debug

If you're stuck with your layout and have issues you can't fix immidiately, i recommend you first try to debug the site with firebug or native browser element inspector (eg. right click --> Inspect element).
This will also help you build your custom layout faster and understand the shematics of how things work in Slick Modal popup.




4. Use minified version

From the performance point it is good practice to use minifed css and js version of the Slick Modal.

Additional notes


Note 1: The layout and functionalities of the item's and their inner elements won't work properly in non supported CSS3 browsers.
Note 2: To view this documentation properly, it is recommended to view it on resolution 1280px of width or above.
Note 3: If you don't understand implementation steps and usage, feel free to contact me. I'm not responsible for any data lost or other damage, which was formed during installation or usage of this items and their elements. Always create backups.




Credits

Special thanks for jCounter countdown plugin to Catalin Berta.

Support


If you get stuck with the installation, usage or modification of the item's, contact me via email support@justcapelle.com or send me a message on Codecanyon.
When you submit a support ticket, please provide much information as possible, for example:

- Your Envato username
- Detailed issue
- URL where you use the item


Thank you again for using Slick Modal. Dont forget to rate :)