lundi 29 juin 2015

Using Jquery-Raty with Meteor


I am trying to add star ratings populated by a field in my database in a template rendered callback. I believe the problem is that raty can not find the images but I've had trouble getting it to work. The images are currently in App/public/img and the raty code in the callback is:

Template.game.rendered = function() {
$('.game-rating').raty({
    readOnly: true,
    numberMax : 5,
    path: App/public/img,
    score: function() {
        return $(this).attr('data-score');
    },
    starOff: 'star-off.png',
    starOn: 'star-on.png'
});


Aucun commentaire:

Enregistrer un commentaire