raty
raty copied to clipboard
Issue with Cached pages and turbolinks
With Turbolinks and Jquery it seems that when a cached page is loaded the rate function can duplicate stars. I could not find a way to remove stars from an element with the library but my solution was to return early.
$.fn.raty = function(method) {
if ($(this).children().length != 0){
return;
}
....
};
Another option would to be allow undo of .raty() so that before the page is cached we can remove the stars from the elements.
Curious to hear your thoughts on this.