Coder Social home page Coder Social logo

joelongstreet / concierge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from albatrocity/concierge

0.0 2.0 0.0 145 KB

A jQuery plugin that creates a walkthrough guide for use in educating users about stuff on the page.

CoffeeScript 100.00%

concierge's Introduction

Concierge

Concierge is jQuery plugin that creates a walkthrough guide for use in educating users about stuff on the page. It basically just lets you set up a bunch of popovers that fire in order.

It was written in Coffeescript and requires Twitter's Bootsrap Tooltip and Bootstrap Popover plugins, and of course jQuery. The Bootstrap Transition plugin is required if you want animation support.

Dependencies

Usage

Concierge works by calling the plugin on a jQuery element that you want to scope actions to, then defining an array of steps.

var importantSteps = [
  {
    element: $('#intro'),               // The Element the popover will be attached to
    title: "Look at this thing!",       // Title of the popover
    content: $('#intro-guide'),         // Can be text, HTML, or a jQuery object
    placement: 'bottom'                 // positioning of popover: top/bottom/left/right
  },
  {
    element: $('.bulk-upload'),
    title: "Bulk Upload",
    content: "For when one upload at a time simply isn't enough. You can click this button and upload lots of things!",
    placement: 'right'
  },
  {
    element: $('.save'),
    title: "Make your edits not disappear!",
    content: "Just as if you wrote them on actual paper, clicking this button will commit what you see to memory forever.",
    placement: 'bottom'
  },
  {
    element: $('.delete'),
    title: "Destroy the evidence!",
    content: "Want to make it all go away? Click here and destroy your hard work!",
    placement: 'top'
  }
]

$('.features').concierge({
  steps: importantSteps,
  onStep: function(stepIndex, $el) {    // Callback on showing step.
    console.log(stepIndex);             // Access to current step index
    console.log("attached to:" + $el);  // and element popover is attached to.
  },
  afterAll: function() {
    alert('ALL STEPS COMPLETED')        // Callback after last step
  },
  nextText: "Next",                     // Text for the next button
  nextClass: "next",                    // Class for the next button
  nextEvent: "click",                   // Event for next action (mouseover, click, etc.)
  startingStep: 0,                      // Optional step to start on. Zero-based
  animation: true                       // Boolean for bootstrap animations
});

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.