Skip to content

Commit

Permalink
v2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wbotelhos committed Nov 2, 2017
1 parent 9be2710 commit 6c2b649
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 62 deletions.
94 changes: 37 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
# jQuery Raty - A Star Rating Plugin

[![Build Status](https://img.shields.io/travis/wbotelhos/raty/master.svg)](https://travis-ci.org/wbotelhos/raty "Travis CI")
[![Dependency Status](https://david-dm.org/wbotelhos/raty.svg)](https://david-dm.org/wbotelhos/raty "Dependency Status")
[![Dev Dependency Status](https://david-dm.org/wbotelhos/raty/dev-status.svg)](https://david-dm.org/wbotelhos/raty#info=devDependencies "Dev Dependency Status")
[![NPM Version](https://badge.fury.io/js/raty-js.svg)](https://badge.fury.io/js/raty-js)
[![Dependency](https://david-dm.org/wbotelhos/raty.svg)](https://david-dm.org/wbotelhos/raty "Dependency Status")
[![Dev Dependency](https://david-dm.org/wbotelhos/raty/dev-status.svg)](https://david-dm.org/wbotelhos/raty#info=devDependencies "Dev Dependency Status")
[![Code Climate](https://codeclimate.com/github/wbotelhos/raty.png)](https://codeclimate.com/github/wbotelhos/raty)
[![Support jQuery Raty](http://img.shields.io/gittip/wbotelhos.svg)](https://gratipay.com/~wbotelhos)

## Version

```
@version 2.7.1
@since 2010.06.11
@author Washington Botelho
@doc wbotelhos.com/raty
```

## Dependencies

+ jquery.js

## Usage with Image

- jquery.raty.js
Expand Down Expand Up @@ -52,51 +40,43 @@ $('div').raty();
$('div').raty({ starType: 'i' });
```

## Bower Install

```js
bower install raty
```

See [bower.io](http://bower.io) for more information.

## Options

```js
cancel : false // Creates a cancel button to cancel the rating.
cancelClass : 'raty-cancel' // Name of cancel's class.
cancelHint : 'Cancel this rating!' // The cancel's button hint.
cancelOff : 'cancel-off.png' // Icon used on active cancel.
cancelOn : 'cancel-on.png' // Icon used inactive cancel.
cancelPlace : 'left' // Cancel's button position.
click : undefined // Callback executed on rating click.
half : false // Enables half star selection.
halfShow : true // Enables half star display.
hints : ['bad', 'poor', 'regular', 'good', 'gorgeous'] // Hints used on each star.
iconRange : undefined // Object list with position and icon on and off to do a mixed icons.
mouseout : undefined // Callback executed on mouseout.
mouseover : undefined // Callback executed on mouseover.
noRatedMsg : 'Not rated yet!' // Hint for no rated elements when it's readOnly.
number : 5 // Number of stars that will be presented.
numberMax : 20 // Max of star the option number can creates.
path : undefined // A global locate where the icon will be looked.
precision : false // Enables the selection of a precision score.
readOnly : false // Turns the rating read-only.
round : { down: .25, full: .6, up: .76 } // Included values attributes to do the score round math.
score : undefined // Initial rating.
scoreName : 'score' // Name of the hidden field that holds the score value.
single : false // Enables just a single star selection.
space : true // Puts space between the icons.
starHalf : 'star-half.png' // The name of the half star image.
starOff : 'star-off.png' // Name of the star image off.
starOn : 'star-on.png' // Name of the star image on.
target : undefined // Element selector where the score will be displayed.
targetFormat: '{score}' // Template to interpolate the score in.
targetKeep : false // If the last rating value will be keeped after mouseout.
targetScore : undefined // Element selector where the score will be filled, instead of creating a new hidden field (scoreName option).
targetText : '' // Default text setted on target.
targetType : 'hint' // Option to choose if target will receive hint o 'score' type.
starType : 'img' // Element used to represent a star.
cancel: false // Creates a cancel button to cancel the rating.
cancelClass: 'raty-cancel' // Name of cancel's class.
cancelHint: 'Cancel this rating!' // The cancel's button hint.
cancelOff: 'cancel-off.png' // Icon used on active cancel.
cancelOn: 'cancel-on.png' // Icon used inactive cancel.
cancelPlace: 'left' // Cancel's button position.
click: undefined // Callback executed on rating click.
half: false // Enables half star selection.
halfShow: true // Enables half star display.
hints: ['bad', 'poor', 'regular', 'good', 'gorgeous'] // Hints used on each star.
iconRange: undefined // Object list with position and icon on and off to do a mixed icons.
mouseout: undefined // Callback executed on mouseout.
mouseover: undefined // Callback executed on mouseover.
noRatedMsg: 'Not rated yet!' // Hint for no rated elements when it's readOnly.
number: 5 // Number of stars that will be presented.
numberMax: 20 // Max of star the option number can creates.
path: undefined // A global locate where the icon will be looked.
precision: false // Enables the selection of a precision score.
readOnly: false // Turns the rating read-only.
round: { down: .25, full: .6, up: .76 } // Included values attributes to do the score round math.
score: undefined // Initial rating.
scoreName: 'score' // Name of the hidden field that holds the score value.
single: false // Enables just a single star selection.
space: true // Puts space between the icons.
starHalf: 'star-half.png' // The name of the half star image.
starOff: 'star-off.png' // Name of the star image off.
starOn: 'star-on.png' // Name of the star image on.
target: undefined // Element selector where the score will be displayed.
targetForma: '{score}' // Template to interpolate the score in.
targetKeep: false // If the last rating value will be keeped after mouseout.
targetScore: undefined // Element selector where the score will be filled, instead of creating a new hidden field (scoreName option).
targetText: '' // Default text setted on target.
targetType: 'hint' // Option to choose if target will receive hint o 'score' type.
starType: 'img' // Element used to represent a star.
```

## Functions
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"license": "MIT",
"main": "lib/jquery.raty.js",
"name": "raty",
"version": "2.7.1"
"version": "2.8.0"
}
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# jQuery Raty - A Star Rating Plugin - http://wbotelhos.com/raty

## 2.8.0

### News

+ Add support to configure options via `$.data()`;

## 2.7.1

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h1><a href="/raty">jQuery Raty</a></h1>
</div>

<nav role="navigation" class="navigation">
<a href="http://github.com/wbotelhos/archive/2.7.0.zip" class="download" title="Download version 2.7.0"><i class="i-file-zip"></i> v2.7.1</a>
<a href="http://github.com/wbotelhos/archive/2.8.0.zip" class="download" title="Download version 2.7.0"><i class="i-file-zip"></i> v2.8.0</a>
<a href="http://github.com/wbotelhos/raty" class="i-github" target="blank" title="Github &lt;http://github.com/wbotelhos/raty&gt;"></a>
<a href="http://wbotelhos.com/labs" class="labs i-labs" target="blank" title="Labs &lt;http://wbotelhos.com/labs&gt;"></a>

Expand Down
2 changes: 1 addition & 1 deletion lib/jquery.raty.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author : Washington Botelho
* @doc : http://wbotelhos.com/raty
* @version : 2.7.1
* @version : 2.8.0
*
*/

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
"scripts": {
"test": "node_modules/karma/bin/karma start spec/karma.conf.js"
},
"version": "2.7.1"
"version": "2.8.0"
}

0 comments on commit 6c2b649

Please sign in to comment.