Giter VIP home page Giter VIP logo

crumble's Introduction

Crumble

A quirky, interactive feature tour using grumble.js for steps along the way.

See the live demo here.

Documentation

Crumble works as a jquery plugin, the meta information for the tour is stored as a standard ordered list in the page HTML.

Basic Usage

$('#tour').crumble();
<ol id="tour" style="display: none;">
  <li data-target="#one" data-angle="130">
    The first step in the tour
  </li>
  <li data-target=".two" data-options="distance:20">
    This is the second step in the tour
  </li>
</ol>

The text of each list element becomes the tour text, this is best kept as short as possible. The possible parameters are:

  • data-target: A selector that tells the tour which element on the page to point at. (required)
  • data-angle: An override for the angle of the bubble between 0-360 (optional)
  • data-options: A list of options that will be passed to grumble seperated by semicolons. (optional)

Options

Crumble can take a range of options to customise it's behaviour and look.

  • scrollSpeed: the speed at which the page will scroll into position if a tour step is off screen.
  • grumble: this object gets passed straight to grumble.js and can include any of the options outlined here
  • onStep: this callback gets triggered every time the user moves forward in the tour
  • onStart: this callback gets triggered at the beginning of the tour
  • onFinish: this callback gets triggered when the tour ends
$('#tour').crumble({
  scrollSpeed: 'fast',
  grumble: {
    distance: 40
  },
  onStep: function(){
    console.log('you moved forward');
  },
	onStart: function(){
    console.log('you started the tour');
  },
	onFinish: function(){
    console.log('you finished the tour');
  }
});

License / Credits

Crumble is released under the MIT license. It is simple and easy to understand and places almost no restrictions on what you can do with Crumble. More Information

Crumble depends on and was inspired by Grumble.js

Download

Releases are available for download from GitHub.

crumble's People

Contributors

tommoor avatar

Watchers

 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.