.val() to get the value?

Nov 5, 2012 at 2:20 PM
Edited Nov 5, 2012 at 2:21 PM

I found the current syntax for getting the value, .rateit('value') a bit clumsy, and not compatible with jQuery.

Any chance to implement a val() method?

Nov 6, 2012 at 10:36 AM

On one hand I see what you mean, but...


  • In order to use the val() method, I will need to change jQuery code. See for example :  http://stackoverflow.com/questions/5895342/how-to-implement-jquery-val-for-a-span . I agree with the commenters that it is a bad idea to hack into jQuery code.
  • Or I have to make breaking changes to rateit, which will mean that instead of adding <div class="rateit"></div> to the page, one will need to add an <input ../> item to the page (because those do work with val() ). I'm not sure that I want to do that.
  • The way of getting the value in RateIt, is quit standard, look for example at http://api.jqueryui.com/slider/#option-value  . 
  • The way of getting/setting a value in RateIt behaves the same as setting for example the min or max value. So within RateIt there is uniformity, which is also important.

So those are my views. Feel free to comment on them.