Problem when running Rateit with JQuery Mobile

Feb 24, 2014 at 11:36 AM
Help!

I'm running into a problem running Rateit with JQuery Mobile and generating the page using perl. When i write the html to the screen using perl, the ratings do not appear until I do a refresh of the page (yeah, that old chestnut once again). If I take the html i just printed using perl and save it in a simple .htm file then that url works fine without any refresh required).

The test htm file url is http://www.homeducate.me/test.htm (it works perfectly)
When I execute the perl program (and generate the same output) it doesn't display the stars properly until I refresh the page. You can test that by going to http:///www.homeducate.me/m.index.htm log in as 'test@test.com' and password 'test' and then click on 'My Tutors'. You will see the page display with no ratings, until you refresh the page.

Hope you can help me!

Thanks.

Scotsman
Feb 24, 2014 at 2:30 PM
Hi,

Your problem is similar to https://rateit.codeplex.com/discussions/473797 .

I guess for you the solution would be to add the rateit plugin already on your main page, and also add the following script:
<script>
    $(document).on('pagechange', function(e, data){    
      $('.rateit').rateit();
     });
</script>
Feb 24, 2014 at 4:33 PM
Thank you so much for your help. Adding the CSS and plug in script lines to the opening page of my site seems to have done the trick (without even having to add the script above)! Thanks for your kind assistance. Much appreciated!