Jquery raty star size attribute not working

I am trying to use jquery.raty.js and jquery.raty.min.js, but I want to make big stars and this will not work. I resized in jquery.raty.js and in this function inside the script.

I have 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 to be 22 or 24 pixels, but its size is always 16.

thank

+5
source share
2 answers

I had the same problem, and for me it was the browser cache ... This did not work until I included this attribute "single: true" in the function,

$('#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 large size. then I thought it might be a cache. And that was so.

Try maybe this solution.

+3
source

$ }); . , , .ready().

, :

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

Raty strars. , . : , .

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

path, .

0

All Articles