The plugin «itour» gives you the opportunity to tell you about the functionality of any interface. In addition, the plugin «itour» can perform the function of teaching, display the task, prompt you what to do and follow up on implementation of tasks. This is the most flexible and functional plugin among all his analogs.
All parts of this plugin: CSS and javascript codes are licensed according to the license purchased from Envato.
Read more about licensing here: http://codecanyon.net/licenses
- Plugin styles file is in the "css" folder
- Plugin scripts file is in the "js" folder
1. The style file. Used for the decoration of all the elements of a plugin. View details
2. Javascript library jQuery View details
3. The main plugin file View details
<head> ...[THIS CODE]... </head>
Add this HTML code with a unique data-name attribute to the code of site page.
Calling the plugin, you should be sure to specify the parameter "steps".
Parameter "steps" includes settings for each step of the tour.
The setting "name" should correspond to the value of the attribute "data-name" in the html code.
I'm using one CSS files itour.css (css/itour.css) in this plugin. It contains styles which are responsible for the correct plugin work.
To use the plugin you must import two files of javascript:
1. jQuery (js/jquery-1.11.1.min.js)
2. jquery.itour.js (js/jquery.itour.js)
1. jQuery is a Javascript library that greatly reduces the amount of code that you must write. If you imported this version of jQuery or any other, it is not necessary to import it for the second time
2. The main plugin code.
Localize the itour help-tour language and format (English / Western formatting is the default).
The itour includes built-in support for languages that read right-to-left, such as Arabic and Hebrew.
To plugin interface was on the language you want, include to page the one of localization files.
These files are in the "js/localization" folder.
Include the file you want after including plugin files
The available languages are:
Example of use: view
To add a plug-in to the site you need to walk a only 3 steps:
1. Include all the necessary files to the page of the site.
2. Place all necessary files on your server using ftp
3. Add HTML code with a unique data-name attribute to the code of site page.
Attention!
These code can be connected anywhere on the page,
but it is important to follow the sequence of the JavaScript files:
1. plugin styles
2. jquery library
3. plugin code
4. initialization code
- The first file should be the jquery library
If you already have this library connected, then you do not need to connect another one, otherwise there may be problems with the conflict
- The plugin code must always be connected after the jquery library. If you connect it first, it will not work!
- The plug-in initialization code should be the last one to be connected.
In this code, you specify all the necessary parameters for the plugin to work.
Option | Default value | Datatype | Description |
---|---|---|---|
CSSClass | "anyClassName" | String | Assign for tour a unique class name to change the display styles of the tour. It may take the values: "any string value" |
tourID | "anyTourID" | String | This string allows you to save data with a unique name about tour progress. It can be used to save information on the progress of the tour for several users. Or save the progress of each tour separately. It may take the values: "any string value" |
introShow | false | Boolean | If set to true, before the tour you will see the introductory slide, which will offer to see a tour. It may take the values: false or true |
introCover | false | Boolean / String | Path to the cover of tour. It may take the values: false or "Path to the cover" |
startStep | 1 | Number | Step from which the tour begins. It may take the values: any positive integer |
tourMapEnable | true | boolean | Tour Map Enable It may take the values: true or false |
tourMapPos | "right" | String | Tour Map Position It may take the values: "right" or "left" |
tourMapJump | true | Boolean | If set to false, then links of steps on the tour map will not be clickable It may take the values: true or false |
tourTitle | "Tour Title Default" | String | Tour title It may take the values: "any string value" |
tourMapVisible | false | Boolean | Specifies to show or hide the map of the tour at the start of the tour It may take the values: false or true |
spacing | 10 | Number | Indent highlighting around the element, px It may take the values: any positive integer |
overlayClickable | true | Boolean | This parameter enables or disables the click event for overlying layer It may take the values: false or true |
modalCancelVisible | false | Boolean | Shows a cancel button in modal window. It may take the values: false or true |
stepNumbersVisible | true | Boolean | Shows the total number of steps and the current step number It may take the values: true or false |
showAbsentElement | false | Boolean | Shows an absent element in tour map and find this element in DOM. It may take the values: true or false |
tourContinue | true | Boolean | This parameter add the ability to continue the unfinished tour. It may take the values: true or false |
textDirection | 'ltr' | String | The direction property specifies the text direction/writing direction. It may take the values: 'ltr' or 'rtl' |
lang |
|
Object | It contains information about the text of the interface elements It may take the values: objects |
lang / cancelText | "Cancel Tour" | String | The text in the cancel tour button It may take the values: "any string value" |
lang / hideText | "Hide Tour Map" | String | The text in the hidden tour map button It may take the values: "any string value" |
lang / tourMapText | "•••" | String | The text in the show tour button It may take the values: "any string value" |
lang / tourMapTitle | "Tour Map" | String | Title of Tour map button It may take the values: "any string value" |
lang / nextTextDefault | "Next" | String | The text in the Next Button It may take the values: "any string value" |
lang / prevTextDefault | "Prev" | String | The text in the Prev Button It may take the values: "any string value" |
lang / endText | "End Tour" | String | Sets the text for the close button in the last step of the tour It may take the values: "any string value" |
lang / contDialogTitle | "Continue the unfinished tour?" | String | Title of continue dialog It may take the values: "any string value" |
lang / contDialogContent | "Click \"Continue\" to start with step on which finished last time." | String | Content of continue dialog It may take the values: "any string value" |
lang / contDialogBtnBegin | "Start from beginning" | String | Text in the start button of continue dialog It may take the values: "any string value" |
lang / contDialogBtnContinue | "Continue" | String | Text in the continue button of continue dialog It may take the values: "any string value" |
lang / introTitle | "Welcome to the interactive tour" | String | Title of introduction dialog It may take the values: "any string value" |
lang / introContent | "This tour will tell you about the main site functionalities" | String | Content of introduction dialog It may take the values: "any string value" |
lang / introDialogBtnStart | "Start" | String | Text in the start button of introduction dialog It may take the values: "any string value" |
lang / introDialogBtnCancel | "Cancel" | String | Text in the cancel button of introduction dialog It may take the values: "any string value" |
steps |
|
Array | Specifies information about each step of the tour It may take the values: array of objects |
steps / image | "" | String | Path to image file It may take the values: "" or string value of path to image |
steps / title | "New Step Title" | String | Title of step It may take the values: "any string value" |
steps / content | "New Step Description" | String | Description of step It may take the values: "any string value" |
steps / contentPosition | "auto" | String | Position of message. "auto" - The plugin can automatically choose the best position out of 36 available to display a tour's message. "center" - The message is displayed in the center of screen and no element is highlighted. The parameter "name" in this case is not required! "xxx" - Code which indicates the position of the window with the message tll, tlc, tlr, tcl, tcc, tcr, trl, trc, trr, rtt, rtc, rtb, rct, rcc, rcb, rbt, rbc, rbb, brr, brc, brl, bcr, bcc, bcl, blr, blc, bll, lbb, lbc, lbt, lcb, lcc, lct, ltb, ltc, ltt "xxx" - First Symbol: The position of message a relatively selected item. "xxx" - Second Symbol: The position of corner a relatively selected item. "xxx" - Third Symbol: The position of the window with a message a relatively coner. |
steps / name | "uniqueName" | String |
Unique Name of highlighted element:
or Class Name
or ID Value
It may take the values: "any string value" |
steps / overlayOpacity | 0.5 | Number |
Opacity value of overlay layer It may take the values: any positive number |
steps / disable | false | Boolean |
Block access to element It may take the values: false or true |
steps / event | "next" | String / Array |
An event that you need to do to go to the next step It may take the values: "next", "click", "mousedown", "mouseup", "mouseenter", "keydown", "keyup", "blur", "submit" and others jQuery events. If you want to listen for the event in another element, then use the array construction. The first array element is an "event", the second element is a jQuery objectIt may take the values: ["eventName",$("yourSelector")] |
steps / skip | false | boolean |
Step can be skipped if you set parameter "skip" to true. It may take the values: false or true. |
steps / nextText | "Next" | String |
The text in the Next Button It may take the values: "any string value" |
steps / prevText | "Prev" | String |
The text in the Prev Button It may take the values: "any string value" |
steps / trigger | false | String / boolean |
An event which is generated on the selected element, in the transition from step to step. jQuery events It may take the values: Name of Event or false |
steps / stepID | false | String |
Unique ID Name. This name is assigned to the "html" tag as "data-step" attribute (If not specified, the plugin generates it automatically in the form: "step-N") It may take the values: "any string value" |
steps / loc | false | String | The path to the page on which the step should work. It may take the values: "anyPagePath" |
steps / delayBefore | 0 | Number | The delay before the element search, ms It may take the values: any positive number |
steps / delayAfter | 0 | Number | The delay before the transition to the next step, ms It may take the values: any positive number |
steps / checkNext | absent | object |
Parameter in which you can carry out any verification by clicking on the "Next" button.
It may take the values: object
|
steps / checkNext / func | absent | function |
If the function returns True, the step will be switched. If the function returns "False", an error message will appear in the message window It may take the values: Any function |
steps / checkNext / messageError | "Fulfill all the conditions!" | string |
If the function returns "False", an error message will appear in the message window It may take the values: Any Text |
steps / checkPrev | absent | object |
Parameter in which you can carry out any verification by clicking on the "Prev" button.
It may take the values: object
|
steps / checkPrev / func | absent | function |
If the function returns True, the step will be switched. If the function returns "False", an error message will appear in the message window It may take the values: Any function |
steps / checkPrev / messageError | "Fulfill all the conditions!" | string |
If the function returns "False", an error message will appear in the message window It may take the values: Any Text |
destroy() |
Removes all effects of plugin. It returns all elements in the condition before the initialization of the plugin This method does not accept any arguments
|
create() |
Triggered when the plugin is created
|
end() |
Triggered when the tour ended, or was interrupted
|
abort() |
Triggered when the tour aborted
|
finish() |
Triggered when step sequence is over.
|
steps / before() |
Triggered before the start of step
|
steps / during() |
Triggered after the onset of step
|
steps / after() |
Triggered After completion of the step, but before proceeding to the next
|
If set to true, before the tour you will see the introductory slide, which will offer to see a tour.
It may take the values: false or true
Element 1 - Element 2 - Element 3
Element 1
-
Element 2
-
Element 3
For creating multi-page tour, you must specify the "loc" parameter with path to the page in value.
If the pages level is the same, just specify the page name (relative path)
loc:'yurPageRelativePath'
If different pages in tour have different depth levels:
site.com/parentPage/pageName
site.com/pageName
then you need to specify the absolute path
loc:'site.com/pageName'
Attention! The parameter "showAbsentElement" with true value is mandatory in creating a multi-page tour.
showAbsentElement:true
Element 1 - Element 2 - Element 5
Element 1
-
Element 2
-
Element 5
Attention!
This intermediate page.
Step from which the tour begins.
It may take the values: any positive integer.
In this example, the tour begins with the second step.
Element 1 - Element 2 - Element 3
Element 1
-
Element 2
-
Element 3
Tour Map Position
It may take the values: "right" or "left"
Start with Map on the LEFT Start with Map on the RIGHT
Element
Start with Map on the LEFT
Start with Map on the RIGHT
Element
If set to false, then links of steps on the tour map will not be clickable
Start with disabled tourMapJumpElement 1 - Element 2 - Element 3
Start with disabled tourMapJump
Element 1
-
Element 2
-
Element 3
tour map can be disabled. To do this, set "tourMapEnable" in a false
Start with disabled tourMapElement 1 - Element 2 - Element 3
Start with disabled tourMap
Element 1
-
Element 2
-
Element 3
Specifies to show or hide the map of the tour at the start of the tour. It may take the values: false or true
For example, two variants are demonstrated:
Variant 1: Disable the tour map at a certain step;
Variant 2: Enable the tour map at a certain step;
Element 1 - Element 2 - Element 3
Indent highlighting around the element, px.
It may take the values: any positive integer
Default Spacing (10px) Spacing 30px Without Spacing (0px)
Element
Default Spacing (10px)
Spacing 30px
Without Spacing (0px)
Element
Position of message.
It may take the values: "auto", "center" or positioning code: "xxx"
"auto" - The plugin automatically choose the best position out of 36 available to display a tour's message.
"center" - The message is displayed in the center of screen and no element is highlighted. The parameter "name" in this case is not required!
"xxx" - Code which indicates the position of the window with the message
tll, tlc, tlr, tcl, tcc, tcr, trl, trc, trr, rtt, rtc, rtb, rct, rcc, rcb, rbt, rbc, rbb, brr, brc, brl, bcr, bcc, bcl, blr, blc, bll, lbb, lbc, lbt, lcb, lcc, lct, ltb, ltc, ltt
"xxx" - First Symbol: The position of message a relatively selected item.
It may take the values: t (top),r (right),b (bottom),l (left)
"xxx" - Second Symbol: The position of corner a relatively selected item.
a) if first symbol is "l" or "r" it may take the values:t (top), c (center),b (bottom);
b) if first symbol is "t" or "b" it may take the values:l (left), c (center),r (right);
"xxx" - Third Symbol: The position of the window with a message a relatively coner.
a) if first symbol is "l" or "r" it may take the values:t (top), c (center),b (bottom);
b) if first symbol is "t" or "b" it may take the values:l (left), c (center),r (right);
Element
Element
An event that you need to do to go to the next step
It may take the values: "next", "click", "mousedown", "mouseup", "mouseenter", "keydown", "keyup", "blur", "submit" and others jQuery events.
Element
Element
An event which is generated on the selected element, in the transition from step to step. jQuery events
It may take the values: Name of Event or false
- -
-
-
Use a small additional snippet of code and the hash link in the page URL
Autostart on this page occurs after changing the hash of the link in the address bar to the value "itour"
Start Tour in Other Page
Start Tour
Element 1
-
Element 2
Autostart on this page occurs immediately after the page is loaded
Start Tour in Other Page
Start Tour
Element 1
-
Element 2
Autostart on this page occurs immediately after the page is loaded
A new autostart is possible only after the set time in "tourTimeout" parameter
Start Tour
Element 1
Element 2
Autostart on this page occurs immediately after the page is loaded
1. New start depends on the set sleep time of the tour.
2. If the user viewed the tour to the end, Auto Start is disabled forever
Start Tour
Element 1
Element 2
If you can not add an "data-name" attribute for the required elements manually, then make a search on the name of the class, id, or by other attributes
Element 1 - Element 2 - Element 3
Element 1
-
Element 2
-
Element 3
If you set value "center" for parameter "contentPosition", then the message is displayed in the center of screen and no element is highlighted.
The parameter "name" in this case is not required!
Use the "image" parameter to add a picture to the message box. As the value specify the path to the image.
For each step, you can specify the different opacity values of the overlay layer.
Element 1 - Element 2 - Element 3
Element 1
-
Element 2
-
Element 3
The highlighted item is assigned to the class "itour-highlight". This class can be used for alternative highlight of element.
Element 1 - Element 2 - Element 3
Element 1
-
Element 2
-
Element 3
Element 1
-
Element 2
-
Element 3
Element 1
-
Element 2
-
Element 3
To localize enough to connect the language file
Element 1 - Element 2 - Element 3
Element 1
-
Element 2
-
Element 3
The direction property specifies the text direction/writing direction.
Element 1 - Element 2 - Element 3
Start Tour
Element 1
-
Element 2
-
Element 3
-
The parameter "overlayClickable" enables or disables the click event for overlying layer.
The parameter "modalCancelVisible" shows a cancel button in modal window.
The presence of this button is desirable if you turn off a clickability of overlay layer.
Start Tour
The parameter "CSSClass" assign for tour a unique class name to change the display styles of the tour.
Element 1
Element 1
You can highlight items that are created in the course of the tour.
Click to create and add a new item into code.
And start your tour.
Click to create and add a new item into code.
And start your tour.
Step can be skipped if you set parameter "skip" to true.
Element 1 - Element 2 - Element 3
Element 1
-
Element 2
-
Element 3
Set parameter "showAbsentElement" to true value to show absent element in tour map.
Start Tour with "showAbsentElement: true" Start Tour with "showAbsentElement: false"
Element 1 - Element 4
Start Tour with "showAbsentElement: true"
Start Tour with "showAbsentElement: false"
Element 1
-
Element 4
These events can trigger various functions before, during and after the demonstration step of tour.
To save the queue of functions, the events is used in conjunction with "delayBefore" and "delayAfter" parameters
Events:
Any Element 2
-
Any Element 1
Any Element 1
Function in which you can carry out any verification by clicking on the "Next" button.
If the function returns True, the step will be switched.
If the function returns "False", an error message will appear in the message window
Select2 is jQuery replacement for select boxes. Select2 gives you a customizable select box with support for searching, tagging, remote data sets, infinite scrolling, and many other highly used options. Download Select2
First element - - - Another element
Start Tour
First element
-
-
-
Another element
A single content area with multiple panels, each associated with a header in a list.
Click tabs to swap between content that is broken into logical sections.
Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.
Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.
Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.
Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.
Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.
Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.
Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.
Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.
First Collapse Button
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Hidden button Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.