Closed Lidofernandez closed 8 years ago
I give more information:
This is the code I use for the star rating:
'click .js-stars-photo': function(event){ var rating = $(event.currentTarget).data('userrating'); var photo_id = this.id; Photos.update({_id: photo_id}, {$set: {rating: rating}}); },
Here you have another photo from the console:
There is no enough information to conclude what is the reason. It's likes because of styles. I will be able to help only if you either create a repo with an example or put here styles you are using for the control.
I've created a repo https://github.com/Lidofernandez/Sharing-Photos-application-with-Meteor.git There is not too much code because I've just started but I would really apreciate your help :) .
Thanks!
@Lidofernandez I'm guessing you're taking the Coursera Meteor.js course. There's actually a solution to the problem posted in the Course Forums over here:
https://www.coursera.org/learn/meteor-development/discussions/oM1TuoxuEeWZfg6Bj_UArQ
@Lidofernandez hey, the problem seems to be in Mongo IDs. Some of them start from a digit and browsers don't recognize them as valid element IDs. So if you add a helper to the photos template that add a prefix to each id, say:
return 'star_' + this._id
it will fix the issue.
and it works like magic!! thank you all!
Hi,
Thanks for the package by the way. I've found it very usefull.
The problem I'm having is that some starts are showing up and others aren't. But, they are still working because if I press in the part that the starts are supposed to appeare it works. I attache a picture as well.