A simple dice plugin with a simple rolling animation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md Update README.md Dec 2, 2015
dice.png first commit May 26, 2013
example.html check May 27, 2013
jquery.dice.js Fixed dice's size in IE Jun 14, 2013

README.md

#jqueryDice

A simple dice plugin with a simple rolling animation

##Requirements

jQuery

##Usage

  <div id='dice'></dice>
  <script>
    $(function(){
      $("#dice")
        .dice()
        .click(fucntion(){ $(this).dice("roll"); });
    });
  </script>

##Options

  $(element).dice({
    diceSize : Size of dice in pixel (default 20),
    duration : Dice rolling duration in milliseconds (default 500)
  });
  
  
  $(element).dice("roll"[, v]);
  
  // v : target value. Default is random.
  
  $(element).dice("option", opt);
  
  // opt : An option object (like above)

##Demo

Click