akhanisatyammg / jquery-star-rating-plugin

Automatically exported from code.google.com/p/jquery-star-rating-plugin
0 stars 0 forks source link

$(this) inside callback not pointing to the container #68

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set up a repeater with multiple star rating lists (e.g. 5 rows, each with a 
star rating in it) and refer to $(this)
2. Bind via a class to each of the elements, e.g.
$('.star-rating-system input[type=radio]').rating({
    callback: function (value, link) {
        alert($(this).next().attr("id")); // or $(this).html() etc
    }
});

What is the expected output? What do you see instead?
I expected $(this) to be a reference to the instance of '.star-rating-system 
input[type=radio]' to which the callback was bound. Is there a way to get this 
information at this point?

What version of the plugin/jQuery are you using?
PLUGIN VERSION: 3.13
JQUERY VERSION: 1.4.2

On what browser(s) or operating system?
BROWSER(S): IE8, Firefox 3.5.8, Windows 7

Please provide a link to where the problem can be observed:
URL: (Intranet / private link)

Feel free to provide any additional information below.

Original issue reported on code.google.com by tim.stcl...@gmail.com on 17 Sep 2010 at 2:19

GoogleCodeExporter commented 8 years ago

Original comment by diego.a...@gmail.com on 23 Feb 2013 at 5:12