GithubHelp home page GithubHelp logo

pkdevboxy / usertourjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cireme/usertourjs

0.0 2.0 0.0 292 KB

A Jquery tutorial widget to create a tour or an animated tutorial for your website.

Home Page: http://www.emeric-stophe.fr/tutorial-jquery/

CSS 11.01% HTML 24.06% JavaScript 64.93%

usertourjs's Introduction

README

What is usertour.js

It's a jQuery widget for web applications that want to offer a step by step tour to their users.

You can try it here if you want

Requirements

jQuery dependency

How to use it

Setting the widget in your project

  1. Download the usertour.js, the usertour.css and add it to your project

  2. Create a config file use to set your different steps, 'tourcongig.js' as done in the example

Set class or id on the part of your web app that you want to show
<h2 id="tuto1"> First I want to show this special title to the user</h2>

<div id="tuto2">
	Then I want to show this element to the user
</div>
Set your steps in the config file

For example

$(document).ready(function() {
	$("body") /* Apply it on the body */
		.tutorial({
			steps : [ {
				identifier : "#tuto1",
				position : "right",
				title : "The title ", 
				text : "You can see here a wonderful h2 title"
			}, {
				identifier : "#tuto2",
				position : "right",
				title : "A bit of text", 
				text : "And here you can highlight a text :)"
			} ]
		})
		.init() /* Call the widget init method */
		.tutorial("start"); /* And launch it */ 
});

Here is a simple example of a tour of two steps

Define Options

Different options can be set to the tour or to the different steps. They all have default values to work on first launch. You can change the container, the id of the tool-tip, the border-color of the highlight or even the button text :

id:".tutorial-tooltip",
steps : [],
intro : {
	launch : false,
	text : "test",
	title : "titre",
	acceptText : "Launch",
	refuseText : "Close"
},
elementContainer : "body",
currentStep : 0,
prevHref : "",
prevRedirectBtn : "",
completeHref : "",
completeBtnText : "Continue",
exitBtnText : "Exit",
nextBtnText : "Next",
prevBtnText : "Previous",
endBtnText : "The end", 
borderColor : "004ECC",
borderSize: 1,
last: false

usertourjs's People

Contributors

cireme avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.