Skip to content

yckart/jquery.tour.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

TourJS is a jQuery plugin for creating beautiful tours. Items are pulled out of the page, you can require an action from the user before moving to the next step of the tour, and TourJS will automatically scroll to hidden items.

Download

Get the raw script, download the complete package or fork it on GitHub.

Usage

To run a tour, call jQuery.tour(tourSteps), where tourSteps is an array of tour steps.

Defining Tour Steps

Tour Steps should be an array, each item representing one step of the tour.

[{
	"msg": "Welcome to TourJS. Let's check out a simple tour.", // tour bubble / dialog text
	"actionName": false, // name of Mixpanel event used for funnel analysis - spaces are fine, use friendly names. You'll need to setup MP yourself however and include the libs.
	"selector": "body", // selector for highlighted feature. Comma seperated list = (dialog target, additional items to pop above mask). Don't forget your '.' or '#'
	"position": "center", // dialog location in relation to target (selector). top, bottom, left, right, (or 'center' which centers to screen)
	"btnMsg": "Start Tour &raquo", // if you'd like a button on the dialog simply add a message here
	"nextSelector": "#tour_dialog_btn", // does the user need to do something specific to advance? For example, clicking the tour bubble ok button. Omit for any action click to advance.
}]

Optional Callback

Calling jQuery.tour(tourSteps, callback) will result in callback being run after the tour is complete.

Demo

See http://yckart.github.io/jquery.tour.js/ for a demo (and check out the source).

Support

@yckart #jquery #tour http://yckart.com

###License Copyright (c) 2013 Yannick Albert (http://yckart.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.