Title: Plugin Reload Code for use with Ajaxify
Last modified: February 21, 2017

---

# Plugin Reload Code for use with Ajaxify

 *  [gogosjon](https://wordpress.org/support/users/gogosjon/)
 * (@gogosjon)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/plugin-reload-code-for-use-with-ajaxify/)
 * Hi,
 * i just found your awesome plugin! It works great without the ajax page loading
   from my theme. When my pages are loaded via ajax the rating plugin (shortcode)
   freezes and is not usable anymore.
 * On other rating plugins (here kkstarratings) it was possible to reload the code
   via:
 *     ```
       $(window).on('statechangecomplete', function() {
           $( document ).ready(function() {
   
       $('.kk-star-ratings').kkstarratings();
       ```
   
 * Is there also a reload code for your plugin?
    Thank you very much! Great work!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Milan Petrovic](https://wordpress.org/support/users/gdragon/)
 * (@gdragon)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/plugin-reload-code-for-use-with-ajaxify/#post-8839088)
 * There is no standard way in how AJAX themes work, so I am not sure what I can
   do here. For now, plugin doesn’t support such method of load, because there is
   no way to know it happens. I will see about doing something about that in the
   future, but I can’t promise anything at this point.
 *  Thread Starter [gogosjon](https://wordpress.org/support/users/gogosjon/)
 * (@gogosjon)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/plugin-reload-code-for-use-with-ajaxify/#post-8896396)
 * Thank you for your answer!
 * I only need a small piece of code to restart the plugin initialization.
 * > because there is no way to know it happens.
 * I want to start the initialization after the ajax page load is finished. I can
   do this with:
 *     ```
       $(window).on('statechangecomplete', function() {
           $( document ).ready(function() {
       ```
   
 * Thank you very much!
 *  Plugin Author [Milan Petrovic](https://wordpress.org/support/users/gdragon/)
 * (@gdragon)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/plugin-reload-code-for-use-with-ajaxify/#post-8904169)
 * Sorry, I can’t help you here, this can’t be done without modification of the 
   plugin. Until this is implemented in the future, there is no quick way to make
   it work.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin Reload Code for use with Ajaxify’ is closed to new replies.

 * ![](https://ps.w.org/gd-rating-system/assets/icon.svg?rev=2889273)
 * [GD Rating System](https://wordpress.org/plugins/gd-rating-system/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gd-rating-system/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gd-rating-system/)
 * [Active Topics](https://wordpress.org/support/plugin/gd-rating-system/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gd-rating-system/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gd-rating-system/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)

 * 3 replies
 * 2 participants
 * Last reply from: [Milan Petrovic](https://wordpress.org/support/users/gdragon/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/plugin-reload-code-for-use-with-ajaxify/#post-8904169)
 * Status: not resolved