Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
takes a list of dom elements and swaps their classes to display one at a time
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.DS_Store
.gitignore
History.md
Makefile
Readme.md
component.json
example.html
index.js

Readme.md

swap-elements

takes a list of dom elements and swaps their classes to display one at a time

Installation

$ component install bmcmahen/swap-elements

Events

  • play
  • stop
  • next
  • prev
  • indexChanged with the index of the current element.

API

swap([selector])

With the default template, attributes available include:

confirmation('.list-elements').play();

swap#play()

Swaps elements on loop.

swap#stop()

Stops swapping elements automatically.

swap#next()

Shows the next element.

swap#prev()

Shows the previous element.

swap#goto([index])

Go to the specified index of an element in the list of elements.

License

MIT

Something went wrong with that request. Please try again.