eddysilvamendes / jquery-star-rating-plugin

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

Allow for rating to be applied to dynamically updated DOM #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Render a page with a starRating form
2. Star rating is applied as expected
3. Update page via AJAX and bring in a new starRating form
4. rating() is not applied and cannot seemingly be applied without breaking

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

Would be nice to be able to apply rating() using something like livequery()
to dynamically apply rating to new forms brought in via AJAX

What version of the plugin/jQuery are you using?
PLUGIN VERSION: v3.12
JQUERY VERSION: -latest

Original issue reported on code.google.com by stephenc...@gmail.com on 12 Jan 2010 at 3:12

GoogleCodeExporter commented 8 years ago
have the same problem:

i have a guestbook like page where u can rate each entry...when someone is 
adding an
entry, i'm reloading the page via ajax.

then i'm using:

$('input[type=radio]').rating();

to get the stars displayed

but after that: it is not possible so submit a rating )=

==

i hope somebody can help, it took me 2 days to get the rating working, so i 
don't
want to switch to an other script. [jQuery noob]

What version of the plugin/jQuery are you using?
PLUGIN VERSION: v3.12
JQUERY VERSION: -latest

Original comment by info%mul...@gtempaccount.com on 13 Jan 2010 at 12:12

GoogleCodeExporter commented 8 years ago
This isn't really a bug. When you use Ajax, unless you are only modifying text
contents, the elements you are changing are removed from the DOM and then 
changed to
whatever you put in. This means that you have to rebind events and what not on
completing the AJAX call. All you would have to do is have the callback from 
the Ajax
call $(ratingElement).rating({ options, ... }) to rebind the ratings.

Original comment by mmeji...@gmail.com on 21 Jan 2010 at 2:55

GoogleCodeExporter commented 8 years ago

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