npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery.stepper

v1.0.0

Published

Shows DOM-elements sequentially with forward and back buttons and events

Downloads

9

Readme

jquery.stepper

Shows DOM-elements sequentially with forward and back buttons and events.

Features

  • Arbitrary DOM-elements can be configured as a series and displayed sequentially
  • Automatic Forward/back-button hiding/display and events for the first and last page
  • Events before and after step switch, for example to set different headings per step or other custom actions
  • Unlimited number of steppers per page
  • Steps can be shared between series and multiple stepper instances
  • Series configuration can optionally be made with CSS-classes alone
  • Show/hide of one or multiple elements per step
  • No encapsulating Container necessary
  • Step switch Animation

Dependencies

  • jQuery

Usage

The default is to use elements with class step in the order defined by additional classes stepN. For example step1, step2, et cetera Elements with the class "nextStep" or "prevStep" get the corresponding button-functionality

Example

$(function () {
	var stepper = $('#stepper').stepper()
	stepper.showStep(1)
})

An example stepper container HTML-structure with a series of steps configured using CSS-classes:

  div#stepper
    div.step.step1
      div.nextStep
    div.step.step2
      div.prevStep
      div.nextStep
    div.step.step3
      div.nextStep
    ...

Options

|optionName|description|optionValue| ----|----|---- |stepConfig|To set step containers and order manually|{stepNumber: jqueryObject, ...}| |animation|Animation when changing steps|jQuery animation name| |animationSpeed|Millisecond duration for the animation|integer| |onStepChange|Must return a true value, otherwise the step change is aborted. Example use case: validation.|function(from, to, stepper, nextStep)| |onAfterStepChange|Called after the next step element has been displayed|function(from, to, stepper, nextStep)| |forwardButton|For retrieving the forwardButton by jQuery-selector, jQuery-object or function|string, jQuery, function(step)| |backButton|For retrieving the backButton by jQuery-selector, jQuery-object or function|string, jQuery, function(step)| |autoHideBackForward|If true, hides the back button on the first step and the forward button on the last step. The default is "true"|boolean|

Methods

  • showStep(number, boolean) - if the second argument is a true value, then the onStepChange and onAfterStepChange events are not triggered
  • hideAll()
  • showFirstStepThatContains(selector)
  • nextStep()
  • prevStep()
  • get(number)
  • disableButtonEvents()
  • enableButtonEvents()