eddysilvamendes / jquery-star-rating-plugin

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

Rating becomes invisible through ajax when switching back and forward #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Check my website http://www.heppaa.net 
2. On the main tab menu, click "New!"
3. Rating is shown correct
4. On the main tab menu, click "Most viewed"
5. Rating is shown correct
6. On the main tab menu, click "New!"
7. jquery throws an error: E.parentnode is null
8. Rating shows the stars, but the values are not displayed anymore

What version of the product are you using? On what operating system?
- Latest version from code.google.com
- jquery 1.3.1

Original issue reported on code.google.com by milovand...@gmail.com on 2 Mar 2009 at 2:30

GoogleCodeExporter commented 8 years ago
I see the exact same problem with 2.61 and jquery 1.3.1 on FF 3.06. I am 
displaying
the rating inside a popup box. After closing and reopening the popup box several
times (usually no more than 8 times) the initial values are not displayed 
anymore (I
can still use the rating to select a value).

I have tried to debug the problem and it seems like the error is coming from 
drain
function. 

Original comment by cipriant...@gmail.com on 5 Mar 2009 at 11:45

GoogleCodeExporter commented 8 years ago
It is indeed somehow related to drain. I can see with firebug, that when doing 
ajax
calls, the groups do not get cleared, they just add up. And then at a certain 
moment,
the function tries to drain an element that is no longer there...

Original comment by milovand...@gmail.com on 12 Mar 2009 at 1:13

GoogleCodeExporter commented 8 years ago
I also notice that this plugin is breaking rule number 1 at
http://www.learningjquery.com/2007/10/a-plugin-development-pattern

"Use only one namespace...

Instead of using $.rating, shouldn't it use var defaults{}?

Original comment by milovand...@gmail.com on 12 Mar 2009 at 1:22

GoogleCodeExporter commented 8 years ago
This issue has been fixed! Yay!

Download the latest version from here:
http://www.fyneworks.com/jquery/star-rating/
Or here:
http://code.google.com/p/jquery-star-rating-plugin/downloads/list

And follow future updates here:
http://twitter.com/fyneworks

Original comment by diego.a...@gmail.com on 12 Mar 2009 at 10:24

GoogleCodeExporter commented 8 years ago
@ milovanderlinden:

I see the problem and will re-structure the plugin accordingly (to use only 1 
namespace) for the next release... Thanks!

Original comment by diego.a...@gmail.com on 12 Mar 2009 at 10:29