Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery raty star size attribute does not work

I am trying to use jquery.raty.js and jquery.raty.min.js but I want to make big the stars and it does not work. I've change the size in jquery.raty.js and in this function inside the script.

I've got this plugin here:

http://wbotelhos.com/raty

$(document).ready(function () {
    $('.star1').raty({
        cancel: true,
        score: 0,
        half: true,
        size: 22,
        path: 'img',
        click: function (score1, evt) {
            $('input.valor').val(score1);
        }
    });
});

I want the star in 22 or 24 pixels but its size is always 16.

Thank you

like image 616
roxeman3 Avatar asked Oct 22 '22 12:10

roxeman3


1 Answers

I had the same problem and for me it was the browser's cache memory... It didn't work until I put in the function this attribute "single:true,"

$('#star').raty({
  cancel   : true,
  cancelOff: 'cancel-off-big.png',
  cancelOn : 'cancel-on-big.png',
  half     : true,
 ->>>>> single   : true,
  size     : 24,
  starHalf : 'star-half-big.png',
  starOff  : 'star-off-big.png',
  starOn   : 'star-on-big.png'
});

and then I could see one of them in big size. then I thought that maybe it was the cache.. and it was.

Try it, maybe is the solution.

like image 169
croigsalvador Avatar answered Oct 24 '22 04:10

croigsalvador