Giter Site home page Giter Site logo

Comments (4)

wazery avatar wazery commented on August 21, 2024

Comment by igorlebovic
Wednesday Nov 28, 2012 at 18:40 GMT


Having the same issue. Any guidance would be highly appreciated.

from ratyrate.

wazery avatar wazery commented on August 21, 2024

Comment by uorji3
Wednesday Nov 28, 2012 at 18:50 GMT


Igor,
I decided to scrap the 5 star rating and go with a simple like/dislike rating.
I'm using the act-as-votable gem.
It's a simpler design but all of my Jquery stays in tact.

from ratyrate.

wazery avatar wazery commented on August 21, 2024

Comment by Balaraju
Wednesday Mar 06, 2013 at 12:07 GMT


Having The Same issue

from ratyrate.

wazery avatar wazery commented on August 21, 2024

Comment by victorcreed
Thursday Apr 11, 2013 at 16:58 GMT


I resolved this problem like this

$.fn.raty.defaults.path = "/assets";
$.fn.raty.defaults.half_show = true;
window.applyRaty = function(){
$(".star").raty({
score: function(){
return $(this).attr('data-rating')
},
number: function() {
return $(this).attr('data-star-count')
},
click: function(score, evt) {
$.post('<%= Rails.application.class.routes.url_helpers.rate_path %>',
{
score: score,
dimension: $(this).attr('data-dimension'),
id: $(this).attr('data-id'),
klass: $(this).attr('data-classname')
},
function(data) {
if(data) {
// success code goes here ...
}
});
}
});
}
$(function(){
applyRaty();
});

then call applyRaty() in *.js.erb

from ratyrate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.