Git Product home page Git Product logo

storytelling-system-dot-rating-widget's Introduction

Storytelling-System-Dot-Rating-Widget

Current Version 1.2.1

An HTML5 widget for dot rating that is used in tabletop roleplaying games based on the Storytelling System (e.g. World of Darkness, Vampire the Masquerade etc). Uses jQuery.

Examples

You can see some basic examples live here.

Using the widget

Include the stylesheet and javascript file in the head section of your page:

<link rel='stylesheet' href='ssdot.css' type='text/css' />
<script src="ssdot.js"></script>

Create an ss-rating and give values to the data-dot-* attributes:

<ss-rating id="Dexterity" data-dot-title="Dexterity" data-dot-max="5" data-dot-min="1" data-dot-value="3"></ss-rating>

Now you can get the value using jQuery like this:

$("#Dexterity").data("dot-value");

From version 1.2.1 the title and the dots adjust on the width of the ss-rating element, title sticking to the left and dots as far right as they can. If you want to change this try customizing the .ss-title and .ss-dots css classes.

The data-dot-* attributes

Attribute Type Description
data-dot-title string The title of the attribute/skill this rating represents.
data-dot-max number The maximum number of dots this rating has.
data-dot-min number The minimum number of dots this rating has.
data-dot-value number The default value of the attribute/skill
data-dot-is-squared boolean If the value is "true" the dot will appear squared and be marked with X
data-dot-color-empty html color Sets the color of the dot when its empty.
data-dot-color-marked html color Sets the color of the dot when its marked.
data-dot-color-border html color Sets the color of the dot's border.

storytelling-system-dot-rating-widget's People

Contributors

ragecryx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

storytelling-system-dot-rating-widget's Issues

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.