I’m using Chris Richards’ Star Rating jQuery Plugin from Github alongwith the jQuery Template plugin. When the data is inline, the rating control works fine. See sample & source.
However, when the rating control is used with dynamically generated data, the star image doesn’t get applied through the CSS to the dropdown control that internally handles the rating. See sample (click on buttons there) & source.
The alert that I have set to the rating control works though. What can be done to make the stars show up instead of the dropdown?
You will need to call
$(".rating").rating();after the dynamic content load is complete.Modify your
getJSONcode: