Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Cached pages and turbolinks #200

Open
mmplisskin opened this issue Feb 1, 2017 · 0 comments
Open

Issue with Cached pages and turbolinks #200

mmplisskin opened this issue Feb 1, 2017 · 0 comments

Comments

@mmplisskin
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant