raty

jQuery Raty and AngularJS

陌路散爱 提交于 2020-01-13 18:09:02
问题 I'm trying to use jQuery Raty plugin with AngularJS. No success yet. What I need is something like: <ul> <li ng-repeat="obj in collection"> <p>{{obj.rating}}</p> <div id="star{{$index}}"></div> <p>{{obj.someText}}</p> <script>$("#star{{$index}}").raty();</script> </li> </ul> But the script seems not to be executed and it doesn't even appear in the webpage. Besides it looks also like a very ugly approach, but I don't have more ideas. How can I do this? Or do I need a different plugin /

Ratyrate stars not loading in production (heroku)

倖福魔咒の 提交于 2020-01-03 02:28:09
问题 So ive got ratyrate working in development just fine by adding <%= javascript_include_tag 'ratyrate.js', "data-turbolinks-track" => false %> to the body of my view. Prior to this the stars would only load when the url was directly accessed or the page refreshed. Now I am having the exact same issue (stars not loading when page is accessed through a link) when deploying my app on heroku! I hope that this is enough info (happy to provide more) and that someone has faced this before/has any

Ratings with Raty not showing up

不打扰是莪最后的温柔 提交于 2019-12-24 21:16:35
问题 So I am following a tutorial and using cloud 9 as my editor. When I run my program and submit a review. Mackenzie's (the person that made the tutorial) review form lets the viewer select stars as their rating. On the other hand, mine only allows the user to put in a number, and the average rating doesn't change. Here is my _form.html.erb <%= form_for([@movie, @review]) do |f| %> <% if @review.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@review.errors.count, "error") %>

how to control target in a multiple jquery raty system

蹲街弑〆低调 提交于 2019-12-24 13:33:31
问题 I'm using jquery raty to do a rating page in php, where multiple rating are displayed. It works ok unless one thing. The score function, and the click function works ok. But I'm having problems trying to set the target for each element. What I want is to show the rating choice on hover over each star. It should show the hint in the div with class "star_hint", but it isn't. Each element is displayed in a div like this: <div class="span4"> <h4>First valoration</h4> <div class="star" data-number

Why is my raty stars not working/loading/appearing in Heroku although it works perfectly fine on development?

痴心易碎 提交于 2019-12-21 18:39:12
问题 I tried all the solution I can found here like precompiling locally, changed jquery.raty.js to jquery.raty.js.erb and others but it doesn't worked for me. I placed the star-half.png, star-off.png, and star-on.png in app/assets/images while the jquery.raty.js is in app/assets/javascripts Solved: Solution that worked for me thanks to this: config/environments/production.rb from: config.assets.compile = false to: config.assets.compile = true 来源: https://stackoverflow.com/questions/35168574/why

Django template tag / jquery for- iteration?

喜夏-厌秋 提交于 2019-12-12 06:35:54
问题 Just a small problem i can't get my head around right now: I have a list of objects presented in a table. One of the objects values is a score. I can use a Django template tag to show this as a number but i want to use my jquery plug-in to show stars instead. Not sure how to iterate over this. I'm trying this: {% for result in mylist %} <td>{{ result.type }}</td> <td>{{ result.description }}</td> <td>{{ result.rating.votes }}</td> <td><div class="raty" data-number="{{ result.rating.score }}">

How to apply raty plugin to new generated divs?

别来无恙 提交于 2019-12-10 13:42:41
问题 I have a page with raty divs. With the classic code $('.raty').raty({...}); the plugin works perfectly on these existing divs. But when I load new raty divs thanks to an ajax function, new divs are "not transformed into stars". Could you please help me to find my mistake ? $.ajax({ url: '/ws/player/reviews/p/1', context: document.body, contentType: "application/json; charset=utf-8", dataType: "jsonp", jsonp: "callback", jsonpCallback: "jsonpCallbackfunction", success: function(data) { $.each

Why is my raty stars not working/loading/appearing in Heroku although it works perfectly fine on development?

不想你离开。 提交于 2019-12-04 10:56:41
I tried all the solution I can found here like precompiling locally, changed jquery.raty.js to jquery.raty.js.erb and others but it doesn't worked for me. I placed the star-half.png, star-off.png, and star-on.png in app/assets/images while the jquery.raty.js is in app/assets/javascripts Solved: Solution that worked for me thanks to this : config/environments/production.rb from: config.assets.compile = false to: config.assets.compile = true 来源: https://stackoverflow.com/questions/35168574/why-is-my-raty-stars-not-working-loading-appearing-in-heroku-although-it-works-p