Closed GoogleCodeExporter closed 8 years ago
I believe you must use something other than '.star' as your selector.
Original comment by craftbee...@gmail.com
on 25 May 2010 at 9:39
I just submitted a similar issue before noticing this one. The problem is
that, at the bottom of the plugin .js file, there is some lines that read:
/*
### Default implementation ###
The plugin will attach itself to file inputs
with the class 'multi' when the page loads
*/
$(function(){
$('input[type=radio].star').rating();
});
As a result, when you try to attach your callback event later, such as:
$('input').rating({
callback: function(){ alert(1); }
});
The callback never gets attached because the control was already created by the
"default implementation" at the bottom of the plugin .js file.
You can get around this bug by removing those lines from the plugin.js - just
note that this means it will *not* automagically apply the star plugin stuff to
your radio inputs.
Original comment by belor...@gmail.com
on 24 Aug 2010 at 9:01
thx. It's working now!
Original comment by Pascal.W...@gmail.com
on 26 Mar 2012 at 10:19
Original comment by diego.a...@gmail.com
on 27 Mar 2012 at 9:20
@ belor...@gmail.com, I've used your suggestions but now the problem is it
doesnot show filled star image on the radio inputs that have checked attribute
(as stated in the documentations it should display the prefilled star on the
radio inputs with checked attribute). I dont understand is there any other way
of using the callback function instead of the hack that you have provided...
Original comment by faraz1...@gmail.com
on 21 Apr 2012 at 7:26
Faraz, please provide a link to your implementation so we can take a look.
The problem is this:
By default, the plugin installs itself to any input with the class "star". But
it does this without any options or callbacks.
In order to have your own callback you need to define this when you invoke the
plugin, eg.:
http://jsfiddle.net/y9hrf/2/
Original comment by diego.a...@gmail.com
on 23 Apr 2012 at 11:08
This solution worked for me!!
Why put the auto initialize inside the plugin.js file
Original comment by ple...@gmail.com
on 11 Nov 2012 at 4:51
Original issue reported on code.google.com by
fabio.st...@gmail.com
on 17 May 2010 at 1:42