Simple Step By Step Site Tour Plugin - Intro.js

Simple Step By Step Site Tour Plugin - Intro.js
File Size: 3.76 MB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT

Intro.js is a simple and fast js library that makes it easier to create Step By Step website tour guide with keyboard and mouse support.

Good for introducing new features of your webisite or application.

See also:

How to use it:

1. Include Intro.js and required CSS files on your web page

<link href="introjs.css" rel="stylesheet">
<!--[if lte IE 8]>
    <link href="introjs-ie.css" rel="stylesheet">
<!-- <![endif]-->

<script type="text/javascript" src="intro.js"></script>

2. Include a theme CSS of your choice on the page. All possible themes:

  • Dark
  • Flattener
  • Modern
  • Nassim
  • Nazanin
  • Royal
<link href="themes/introjs-dark.css" rel="stylesheet">

3. Markup html structure. Simply using data-step, data-intro and data-position to create the site tour container. All possible data attributes:

  • data-intro: The tooltip text of step
  • data-step: the number (priority) of step
  • data-tooltipClass: the CSS class for tooltip
  • data-highlightClass: the CSS class for the helperLayer
  • data-position: top, left, right, bottom (default), bottom-left-aligned (same as bottom), bottom-middle-aligned, bottom-right-aligned or auto
  • data-scrollTo: the element to scroll to
  • data-disable-interaction: disable interactions with elements inside the highlighted box
<div data-step="1" data-intro="Content 1">Feature #1</div>
<div data-step="2" data-intro="Contetn 2" data-position='right'>Feature #2</div>
<div data-step="3" data-intro="Contetn 3" data-position='left'>Feature #3</div>

4. Create a link to trigger the site tour.

<a href="javascript:void(0);" onclick="javascript:introJs().start();">Show me how</a>

5. All possibile options.

// introJs().setOption(optionName, optionValue);

/* Next button label in tooltip box */
nextLabel: 'Next &rarr;',

/* Previous button label in tooltip box */
prevLabel: '&larr; Back',

/* Skip button label in tooltip box */
skipLabel: 'Skip',

/* Done button label in tooltip box */
doneLabel: 'Done',

/* Hide previous button in the first step? Otherwise, it will be disabled button. */
hidePrev: false,

/* Hide next button in the last step? Otherwise, it will be disabled button. */
hideNext: false,

/* Default tooltip box position */
tooltipPosition: 'bottom',

/* Next CSS class for tooltip boxes */
tooltipClass: '',

/* CSS class that is added to the helperLayer */
highlightClass: '',

/* Close introduction when pressing Escape button? */
exitOnEsc: true,

/* Close introduction when clicking on overlay layer? */
exitOnOverlayClick: true,

/* Show step numbers in introduction? */
showStepNumbers: true,

/* Let user use keyboard to navigate the tour? */
keyboardNavigation: true,

/* Show tour control buttons? */
showButtons: true,

/* Show tour bullets? */
showBullets: true,

/* Show tour progress? */
showProgress: false,

/* Scroll to highlighted element? */
scrollToElement: true,

 * Should we scroll the tooltip or target element?
 * Options are: 'element' or 'tooltip'
scrollTo: 'element',

/* Padding to add after scrolling when element is not in the viewport (in pixels) */
scrollPadding: 30,

/* Set the overlay opacity */
overlayOpacity: 0.8,

/* Precedence of positions, when auto is enabled */
positionPrecedence: ["bottom", "top", "right", "left"],
/* Disable an interaction with element? */
disableInteraction: false,

/* Set how much padding to be used around helper element */
helperElementPadding: 10,

/* Default hint position */
hintPosition: 'top-middle',

/* Hint button label */
hintButtonLabel: 'Got it',

/* Adding animation to hints? */
hintAnimation: true,

/* additional classes to put on the buttons */
buttonClass: "introjs-button"

6. API methods available.

// start the intro

// goto specific step

// goto specific step with the concrete step

// add step

// add steps

// goto next step

// back to prev step

// exit the into

// set option(s)
introJs.setOption(option, value)

// refresh

// event handlers

7. If you want to add hints to the tours.

<a href='' 
   data-hint='Step one!'

8. Possible options for the hints.

  hint: 'text for the hint',
  element: element,
  hintPosition: 'top-middle',
  hintAnimation: true

9. API methods for the hints.

// set option(s)
introJs.setOption(option, value)

// refresh

// add hints

// show specified hint

// show hints

// hide specified hint

// show hint dialog

// hide all hints

// event handlers


v2.9.3 (2018-07-20)

  • hotfix to skipping and exiting the intro

This awesome jQuery plugin is developed by usablica. For more Advanced Usages, please check the demo page or visit the official website.