Can't get raty plugin working - PHP

75 Views Asked by At

I've been having trouble getting raty star rating plugin working with PHP. When I run the function is just displays a text box with the value, but no stars! Here is my html... (I have a number of div's with the class 'star')

<div class="star" data-rating="3"></div>

And my function...

    function euroStarInit() {
    var star;
    $('.star').raty({
        path: '../library/images/',
        score: function () {
            return $(this).attr('data-rating');
        },
        readOnly: true,
        hints: '',
        noRatedMsg: ''
    });
}

This will just return a read only textbox with the value 3 in it. I have all the includes added correctly, I have the images in the correct directory, everything seem to be called correctly but just can't figure out what I'm doing wrong!!

Could someone please help me and point me in the right direction?!

0

There are 0 best solutions below