/*!
* jQuery Raty - A Star Rating Plugin
*
* The MIT License
*
* @author : Washington Botelho
* @doc : http://wbotelhos.com/raty
* @version : 2.7.0
*
*/
;
(function($) {
'use strict';
$.fn.raty.defaults = {
cancel: false,
cancelClass: 'raty-cancel',
cancelHint: 'Cancel this rating!',
cancelOff: 'cancel-off.png',
cancelOn: 'cancel-on.png',
cancelPlace: 'left',
click: undefined,
half: false,
halfShow: true,
hints: ['bad', 'poor', 'regular', 'good', 'gorgeous'],
iconRange: undefined,
mouseout: undefined,
mouseover: undefined,
noRatedMsg: 'Not rated yet!',
number: 5,
numberMax: 20,
path: undefined,
precision: false,
readOnly: false,
round: {
down: 0.25,
full: 0.6,
up: 0.76
},
score: undefined,
scoreName: 'score',
single: false,
space: true,
starHalf: 'http://www.wbotelhos.com/raty/lib/images/star-half.png',
starOff: 'http://www.wbotelhos.com/raty/lib/images/star-off.png',
starOn: 'http://www.wbotelhos.com/raty/lib/images/star-on.png',
starType: 'img',
target: undefined,
targetFormat: '{score}',
targetKeep: false,
targetScore: undefined,
targetText: '',
targetType: 'hint'
};
})(jQuery);
$(function() {
$('#stars').raty();
})
@import url('http://getbootstrap.com/dist/css/bootstrap.css');
span {
vertical-align: middle;
}
img {
vertical-align: middle;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://www.wbotelhos.com/raty/lib/jquery.raty.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.0/bootstrap.min.js"></script>
<table class="table table-striped">
<tbody>
<tr>
<td id="stars" style=" text-align: center; vertical-align: middle; border:1px solid black;" id="mycell"><span>TEXT</span>
</td>
</tr>
</tbody>
</table>