jquery Speedo Popup Product Documentation Version 2.1

Similar documents
USER GUIDE AND THEME SETUP

BEST PRACTICES HTML5 SPECIFICATIONS. what's next in data-driven advertising. File Types. HTML5: HTML, JS, CSS, JPG, JPEG, GIF, PNG, and SVG

Kinetika. Help Guide

Enlargeit! Version 1.1 Operation Manual

WCMS Responsive Design Template Upgrade Training

classjs Documentation

PHP / MYSQL DURATION: 2 MONTHS

T his article is downloaded from

ITEC447 Web Projects CHAPTER 10 FLASH & SILVERLIGHT 1

READSPEAKER ENTERPRISE HIGHLIGHTING 2.5

1 Woocommerce Products Designer


WEB DESIGNING CURRICULUM

DOCUMENTATION. Table of content : GETTING STARTED. First Step. Theme Installation. Theme License. Importing Demo Data.

Table of contents. DMXzone Ajax Form Manual DMXzone

icreate Editor Tech spec

Table of contents. DMXzone Nivo Slider 3 DMXzone

WEB DESIGNING COURSE SYLLABUS

Table of contents. Ajax AutoComplete Manual DMXzone.com

CUSTOMISATION FEATURES

A set-up guide and general information to help you get the most out of your new theme.

Introduction to WEB PROGRAMMING

«FitPhoto» Integration

Static Webpage Development

Web Designing Course

v0.9.3 Tim Neil Director, Application Platform & Tools Product

showinplaceholder The jquery Plug-in

User Guide and Theme Setup

How to Use the WP Lightbox Ultimate Plugin to Use Private/Protected Amazon S3 Videos and PDF Files

* Used setattribute to set londesc, so that the value is accessible via DOM Node longdesc property #508

Flexslider v1.x Installation and User Manual

!"#"## $% Getting Started Common Idioms Selectors Animations & Effects Array vs. NodeList Ajax CSS Credits. jquery YUI 3.4.

User Guide. Version 1.0

Installation & User Guide

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

Content Elements. Contents. Row

Get in Touch Module 1 - Core PHP XHTML

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Altima Lookbook Professional Magento ecommerce Extension Version 1.6.9

SharePoint List Booster Features

EASYDNNGALLERY 6.0 [USER S GUIDE]

UI Course HTML: (Html, CSS, JavaScript, JQuery, Bootstrap, AngularJS) Introduction. The World Wide Web (WWW) and history of HTML

Varargs Training & Software Development Centre Private Limited, Module: HTML5, CSS3 & JavaScript

for Lukas Renggli ESUG 2009, Brest

Overview

ENRICHING PRIMO RECORDS WITH INFORMATION FROM WORDPRESS. Karsten Kryger Hansen Aalborg University Library

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

Video Embedder. Plugin for Joomla! This manual documents version 9.x of the Joomla! extension.

JSN PageBuilder 2 User Manual

Design Document V2 ThingLink Startup

ethnio tm IMPLEMENTATION GUIDE ETHNIO, INC W SUNSET BLVD LOS ANGELES, CA TEL (888) VERSION NO. 3 CREATED JUL 14, 2017

ICT IGCSE Practical Revision Presentation Web Authoring

itunes Extras/iTunes LP Development: TuneKit Programming Guide v1.0

Realistic 3D FlipBook Experience. for Magazines, Photographers, Portfolios, Brochures, Catalogs, Manuals, Publishing and more...

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser?

jquery Tutorial for Beginners: Nothing But the Goods

WPI Project Center WordPress Manual For Editors

Integrating Facebook. Contents

CIS 408 Internet Computing Sunnie Chung

Professional Course in Web Designing & Development 5-6 Months

Table Basics. The structure of an table

Sparrow Client (Front-end) API

Modules Documentation ADMAN. Phaistos Networks

Advanced iframe Pro v7.5.2 (Your installation is up to date - view history)

Jquery Manually Set Checkbox Checked Or Not

SymphonyThemes Quick Start Guide. Build a great theme with SymphonyThemes

Helpline No WhatsApp No.:

Google Maps Manually Place Marker On Click V3 Remove

EDCI 270 Coding Instruction. Linking

JavaScript Programming

AURUM Metro Navigation

The Fox Documentation

CIW 1D CIW JavaScript Specialist.

Design patterns and Animation with jquery. with Paul Bakaus

DNNGo LayerSlider3D. User Manual

How to Edit Your Website

This course is designed for web developers that want to learn HTML5, CSS3, JavaScript and jquery.

CS197WP. Intro to Web Programming. Nicolas Scarrci - February 13, 2017

KEEP THEM ON YOUR WEBSITE! INTEGRATING THIRD-PARTY TOOLS TO PROVIDE A CONSISTENT USER EXPERIENCE

Remote Tracker Documentation

Version User Guide. Page 1 digrotate dignuke

SmartTheme Manual 1 Last update: 2017/07/29 OptimizePress

HTML5. HTML5 Introduction. Form Input Types. Semantic Elements. Form Attributes. Form Elements. Month Number Range Search Tel Url Time Week


N/A. JSN PageBuilder 2 Configuration Manual Introduction. System Requirements. Product Usage. Joomla Requirements. Server Requirement

XMS Systems Style Sheet Cheat Sheet

Working with Images and Multimedia

GoLive will first ask you if your new site will be for one individual or a work group; select for a Single User, and click Next.

Sign-up Forms Builder for Magento 2.x. User Guide

Virto SharePoint Forms Designer for Office 365. Installation and User Guide

Context-sensitive Help

Chapter 1 Introduction to Dreamweaver CS3 1. About Dreamweaver CS3 Interface...4. Creating New Webpages...10

RC Justified Gallery User guide for version 3.2.X. Last modified: 06/09/2016

PHP WITH ANGULAR CURRICULUM. What you will Be Able to Achieve During This Course

BOOTSTRAP TOOLTIP PLUGIN

PLAYER DEVELOPER GUIDE

frameset rows cols <frameset> rows cols

Introduction. Part I: jquery API 1. Chapter 1: Introduction to jquery 3

Website Report for colourways.com.au

Module 5 JavaScript, AJAX, and jquery. Module 5. Module 5 Contains 2 components

Transcription:

jquery Speedo Popup Product Documentation Version 2.1 21 June 2013

Table of Contents 1 Introduction... 1 1.1 Main Features... 1 1.2 Folder Structure... 1 2 Working with jquery Speedo Popup... 2 2.1 Getting started... 2 2.2 Using options... 2 2.2.1 Available options... 3 2.3 Content... 5 2.4 Themes... 5 2.5 Effects... 6 2.6 Custom Buttons... 7 2.7 Direct Link... 8 2.8 Using Cookies... 8 3 Working with advanced features... 9 3.1 Introduction... 9 3.2 Show/Hide Popup... 9 3.3 Set Content... 9 3.4 Set width/height... 10 3.5 Center popup... 10 3.6 Get box size... 10 3.7 Using callback... 10 i

1 Introduction jquery Speedo Popup is a small, powerful and real customizable jquery plugin. With Speedo Popup you can create complex popups very simple. It comes with 14 predefined skins, 15 predefined CSS3 transitions and 7 predefined jquery transitions. Speedo Popup v2.0 has been completely rewritten, as a modular plugin, this means that the plugin is now faster, consuming lower resource, smaller file size, dynamic etc. Speedo Popup is built with CSS3 and HTML5, but it is also, compatible with older versions of browsers. 1.1 Main Features jquery Speedo Popup has many features, but here we will only specify the more important one: 15 predefined CSS3 effects. 10 predefined CSS3 themes. 8 predefined jquery transitions. Run popup only an amount of time through Cookies. Multiple instances on one page, with separate settings for each one. Automatic Show You can play HTML5 audio. Close and Show timer. Direct Link (Show popup by using a link). Can use any kind of browser compatible content: o HTML o Frame (website, image etc.) o Flash file (swf) o Embedded video Cross-Browser compatibility Multiple callbacks Small file size 1.2 Folder Structure File Name Description speedo.popup.js Core plugin file (full size version). speedo.popup.min.js Core plugin file (minified version). speedo.popup.fx.css Core CSS3 effects file. skins All the skins are kept inside this folder. -- default The skin files are kept inside this folder. -- default.css The core skin file (The skin file is named like the skin name). -- images All the skin images are kept inside this folder. Note: The structure of a skin directory mat vary based on the content needed for the skin. 1

2 Working with jquery Speedo Popup In this section you will learn to use jquery Speedo Popup. This section will start with basic stuff and it will go to advanced stuff. 2.1 Getting started To use Speedo Popup, you need to start by extracting the files from the zip. If you want to use Speedo Popup in your website, you need to copy the source folder into your site root folder. Inside your page in head section you need to include jquery, if not already, Speedo Popup JavaScript file, and specific CSS. <script type= "text/javascript" src= "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" ></script> <script type= "text/javascript" src= "source/speedo.popup.min.js" ></script> <link rel= "stylesheet" type= "text/css" href= "source/skins/default/default.css" ></link> Note: Here we only load the default skin, but you can copy the whole last line and change the default to any skin you want to use also, you need to specify the skin when you are calling the popup. Note: The Available skins are listed later in the theme section. Now, you can start the popup in two ways, first you can call it using JavaScript: <script type= "text/javascript" > $( function () { }); $.fn.speedopopup({htmlcontent: "<p> I'm a simple content </p>" }); </script> The above code will show a popup, every time the page finished loading, with the content specified inside htmlcontent and using the default skin. The second way is to use a direct link, by adding the class speedo-popup to an anchor: <a href="image.jpg" class ="speedo-popup" > Show Popup </a> The above code will show a popup, every time the Show Popup anchor is clicked, with an image as content and using the default skin. 2.2 Using options To use an option on Speedo Popup from JavaScript, you need to pass it to the speedopopup function: $.fn.speedopopup({property: value, }); 2

Or if you want to use a direct link: <a href= "image.jpg" class= "speedo-popup" data-speedo-options= {property: value, } >Show Popup</a> Note: To use this you need to follow valid JSON syntax including quoted property names. You can add multiple contents in both ways using, comma to split them. 2.2.1 Available options Property Type Description Possible Values Default width String, Number Width of the popup container. If this parameter is null, pixels null the width will be automatically adjusted from the content width. height String, Number Height of the popup container. If this parameter is pixels null null, the height will be automatically adjusted from the content height. left String, Number Left position, of the popup container. If this value is pixels 'center' either null or 'center', the container will automatically be centered. top String, Number Top position, of the popup container. If this value is pixels 'center' either null or 'center', the container will automatically be centered. close Boolean Show close icon true, false true closecaption String Close button caption. If this is either null or an empty string, the close button will have no text/html caption. caption text empty string theme String Select popup skin. If the skin don't exists, the popup will be loaded with the default skin. skin name 'default' htmlcontent String Popup content as an HTML string. If this is null or false, the htmlcontent parameter will be ignored and the popup will try to use the href property. caption String Popup caption. If this is, null or empty string, the popup caption will not be created. href String Address to the content to be loaded. If this is either null or false, the popup will try to load the content from htmlcontent property. content passed as, string containing html code caption text content address '<p> Default content </p>' null overlayclose Boolean Close popup when overlay is clicked. true, false true autoclose Number Wait an amount of time, after that time passed, the number in ms, false popup will close automatically. false autoshow Number Wait an amount of time, after which the popup will, show. effectin String Effect used while the popup is showing. 'none', number in ms, false 'fade', 'growbox', 'incerto', 'slideleft', 'slidetop', 'slideright', 'slidebottom', 'slidezoom' null false 'none' 3

effectout String Effect used while the popup is hiding. 'none', 'fade', 'growbox', 'incerto', 'slideleft', 'slidetop', 'slideright', 'slidebottom', 'slidezoom' css3effects String CSS3 effect used while the popup is showing or hiding. This effect will override the effectin or effectout, in modern browser that supports CSS3 animations. useframe Boolean Force the content to load into a frame. The href property will be used as the frame url, the htmlcontent property will be ignored. useajax Boolean Force the content to load with an ajax call. The href property will be used as the url for the ajax call, the htmlcontent property will be ignored. loadingimage Boolean Show loading image while the content is being loaded. 'none', 'zoomin', 'zoomout', 'flip', 'flipinhor', 'flipinver', 'bouncein', 'pagetop', 'flyin', 'fadeinscale', 'scaledown', 'fadespin', 'pulse', 'leftspeedin', 'rollin', 'rollout', 'pulsebody', 'fadespinbody' true, false true, false true, false mp3path String Play mp3 audio files. Path to an mp3 undefined audio file. oggpath String Play ogg audio files. Path to an ogg undefined audio file. volume Number Audio volume. 0.0 to 1.0 1.0 unload Boolean Destroy the popup completely (Remove the html code true, false true from page). If this is set to false, the popup will just be hidden, this can be used so the popup starts faster. draggable Boolean Enable window dragging. true, false false responsive Boolean Enable responsive popup. If this is enabled, the popup true, false true will automatically resize, to fit inside the browser window. loop Boolean Start from the beginning, when we reach the end of a true, false true group. buttons Object Add custom buttons to the popup. [{html: 'About', action: function () { alert('speedo null 'none' false false false true 4

Popup'); }, class: 'button-test'},...] onbeforeshow Function Called before the popup is showing. function () {... } function(){} onshow Function Called when the popup is showing, function () {... } function () {} oncomplete Function Called after the content, finished loading. function () {... } function () {} onhide Function Called when the popup is hiding. function () {... } function () {} onclose Function Called when the popup receives a close command. function () {... } function () {} onaudiostart Function Called when the audio starts playing. function () {... } function () {} onaudiostop Function Called when the audio stops playing. function () {... } function () {} 2.3 Content There are two ways to set the content: 1. Set the popup content using htmlcontent property: $.fn.speedopopup({htmlcontent:: "<p> I'm a simple content </p>" }); 2. Set the popup content using href property: $.fn.speedopopup({href: "image.jpg"}); Note: You can use the useframe property to force the content to load inside an iframe. Note: You can use the useajax property to force the content to load through an AJAX call. The type of the content is automatically determined by the assigned content. Speedo Popup also, supports YouTube, Vimeo, Google, Metacafe, Dailymotion, WordPress, SWF, videos. The following table specifies the priority based on the content type: Type Description Priority HTML Load HTML content from a string. Lowest Images Load images as the popup content. Low Videos Load media clips. High Web pages Load web pages inside frame container or with ajax, directly inside a div. Highest 2.4 Themes Speedo Popup comes with 10 predefined themes/skins: 5

1. default 2. dark 3. light 4. trap 5. metro 6. lightbox 7. blueglass 8. darkglass 9. notify-glass 10. ignite The list above it s the default themes available in jquery Speedo Popup v2.1. Speedo Popup allows you to create custom themes. To use one of the available themes, you first need to include its CSS file in the page: <head>... <link rel= "stylesheet" type= "text/javascript" src= "SpeedoPopup/skins/metro/metro.css" />... </head> Now, when you call the popup you need to specify the theme to use: $.fn.speedopopup({theme: "dark"}); 2.5 Effects Speedo Popup comes with 8 jquery predefined effects, and 17 CSS3 effects. You can choose a jquery effect using the properties effectin and effectout : $.fn.speedopopup({ effectin: "fade", effectout: "fade" }); The following predefined jquery effects are available: 1. none 2. fade 3. growbox 6

4. incerto 5. slideleft 6. slideright 7. slidetop 8. slidebottom 9. slidezoom You can choose a CSS3 effect using the css3effects property: $.fn.speedopopup({ effectin: "fade", effectout: "fade", css3effects: "flyin" }); Note: We are still using jquery effects for old browsers. The following predefined CSS3 effects are available: 1. zoomin 2. zoomout 3. flip 4. flipinhor 5. flipinver 6. bouncein 7. pagetop 8. flyin 9. fadeinscale 10. scaledown 11. fadespin 12. pulse 13. leftspeedin 14. rollin 15. rollout 16. pulsebody 17. fadespinbody Note: Speedo Popup allows you to create your own jquery and CSS3 effects. 2.6 Custom Buttons Speedo Popup lets you add custom buttons to the popup. You can do this very simple: $.fn.speedopopup({ buttons: [{ 7

html: "About", action: function () { alert("this is a simple sample for Speedo Popup Buttons."); }, class: "about-button" }] }); You can add an unlimited number of buttons. The html and action property are required for every button any other property will be added to the button as an html attribute. The buttons can also, be added through a direct link. 2.7 Direct Link You can use a simple link to show the popup, just like a light box. The anchor will be found through the speedo-popup class: <a href= "image.jpg" class= "speedo-popup" >Show Popup</a> You can specify the same options that are available through JavaScript using data-speedo-options attribute: <a href= "image.jpg" data-speedo-options= {"width": 640, "height": 360, "theme": "metro"} class= "speedopopup">show Popup</a> Note: As of Speedo Popup v2.0 passing options through href has been deprecated, however in v2.0 it is still possible to use the query, but there are no longer available in v2.1. 2.8 Using Cookies Speedo Popup can also use cookies to show the popup a limited number of times to a user. This feature is very simple to use, you only need to set the startcount to the number of times you want a user to see the popup, and to set interval to the number of days the cookie should be available: $.fn.speedopopup({ startcount: 1, interval: 30 // The default value for this is 30 days. }); 8

3 Working with advanced features Speedo Popup has a set of advanced features, for programmers and users who manage to make their way in JavaScript. In this section we will go in more detail about these advanced features. 3.1 Introduction In order to use the advanced features of the popup, you need to get the instance of the popup, to do that you just need to assign the return of the plugin to a variable: $(function (){ var mypopup = $.fn.speedopopup({ }); the page. window.mypopup = mypopup; // Make this variable public so it can be accessed everywhere in }); Now, you can use the variable mypopup, to handle popup functionality. 3.2 Show/Hide Popup You can show/hide the popup by calling showpopup and hidepopup: mypopup.hidepopup(); mypopup.showpopup(); These functions have no parameters and no return value. 3.3 Set Content You can set content programmatically through the function setcontent: mypopup.setcontent("simple HTML Content"); This function has tree parameters: content The content to set inside popup. type The type of the content this can be any of the following: o html o image o ajax o iframe o flash o undefined If you don t pass anything to this parameter, or you set it to undefined, the function will try to detect the type of the content based on the content passed. 9

complete Callback function called when the content loading is complete. This function has no return value. 3.4 Set width/height You can set width and height programmatically using the functions width and height: mypopup.width(320); mypopup.height(480); These functions have two parameters: value The width or height value based on the function. animate Animate the resize. Default is true. Return Value: If you pass a value to the function, the return value is the old width/height, if you don t pass a value to the function the return value is the current width/height. 3.5 Center popup You can center the popup programmatically using the function centerpopup: mypopup.centerpopup(); This function has no parameters and no return value. 3.6 Get box size You can get the popup box size programmatically using the function get_box_size: var boxsize = mypopup.get_box_size(); This function has no parameter. Return Value: The function will return a JSON object containing left, top, width, height, with the following structure: {left: center, top: center, width: 500, height: 300} 3.7 Using callback You can use a callback by simply specifying it in the options: $.fn.speedopopup({onclose: function (){ }}); 10

For a list of callbacks see the options section. 11