Skip to content

JavoByte/rouletteWheel

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
img
 
 
src
 
 
 
 
 
 
 
 

jQuery Roulette Wheel

Description

jQuery Roulette Wheel allows you to convert a canvas in a random selection roulette. This project is based on this article.

This plugin extends the code in article by:

  • Allowing to add any number of options, auto-generating a color for each one.
  • A callback function is called when an item is selected.
  • The spin button is rendered in the center of the wheel, instead of using a <button> element

Requirements

  • jQuery
  • jQuery UI

Usage

Simply include the rouletteWheel.js and start the plugin with jQuery like this:

$('canvas').rouletteWheel({
  items : {
    'key' : 'value'
  },
  selected : function(key, value){
    'selected callback function'
  },
  spinText : 'Spin me' //text to display in spin button
});

Customize

Coming soon

License

Released under the MIT License

About

Roulette Wheel jQuery plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published