danlamb/boardvitals — pull request #9 by bhgames (2013-12-10 13:10:23+00:00)
Title: Better average rating implementation

Check this out. Your click event would only work once because each time the setStar function tears out the interior of the Div, including the element upon which your function is attached for clicking. It resets the click inside this function after it re-raty's the div with the new question star info. So I use the click handler there. When you setStar, it hides averageRating, and when you click, it shows it. I also make use of the hide() and show() commands. Check out my use of the data-initial-score field on average score as well - it's a made up attribute I added so I can get the initial_score off the div that comes down from the server. @noahprince22