Export to GitHub

jquery-star-rating-plugin - issue #21

Callback handlers not reacting


Posted on Mar 27, 2009 by Happy Rhino

What steps will reproduce the problem? 1. Create a new page, including the rating plugin 2. Initialize the rating plugin like this:

$(".star").rating({ callback: function(value, link) { // Wert setzen console.log("callback"); }, focus: function(value, link) { console.log("focus"); }, blur: function(value, data) { console.log("blur"); } });

What is the expected output? What do you see instead?

I expect that the specified callback handlers are called.

Instead, none of them is called.

Solution: if I comment out the default initialization of the plugin at the end of jquery.rating.js, it works fine

What version of the plugin/jQuery are you using? PLUGIN VERSION: 3.10 JQUERY VERSION: 1.3.2

On what browser(s) or operating system? BROWSER(S): FF3

Please provide a link to where the problem can be observed: URL:

Feel free to provide any additional information below.

Comment #1

Posted on Mar 27, 2009 by Swift Cat

You must use a selector other than ".star"

Comment #2

Posted on May 5, 2014 by Massive Dog

Work fine whn you remove default initialization

Comment #3

Posted on May 6, 2014 by Swift Cat

Don't use class "star". That's reserved for the plugin. Use something else, then the plugin will NOT start automatically.

Like this: http://jsfiddle.net/xYSGe/

Status: Invalid

Labels:
Type-Defect Priority-Medium