Title: Benjosity's Replies | WordPress.org

---

# Benjosity

  [  ](https://wordpress.org/support/users/benjosity/)

 *   [Profile](https://wordpress.org/support/users/benjosity/)
 *   [Topics Started](https://wordpress.org/support/users/benjosity/topics/)
 *   [Replies Created](https://wordpress.org/support/users/benjosity/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/benjosity/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/benjosity/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/benjosity/engagements/)
 *   [Favorites](https://wordpress.org/support/users/benjosity/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Favorites] Dynamically update favourites list after favourite button clicked](https://wordpress.org/support/topic/dynamically-update-favourites-list-after-favourite-button-clicked/)
 *  Thread Starter [Benjosity](https://wordpress.org/support/users/benjosity/)
 * (@benjosity)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/dynamically-update-favourites-list-after-favourite-button-clicked/#post-7308142)
 * Hi jfvwork
 * I’ve put it in my JavaScript/jQuery file where all my JavaScript and jQuery is.
 * You could also place it in your header.php file like so –
 *     ```
       <script type="text/javascript">
       jQuery('.simplefavorite-button').click(function(event) {
           jQuery(document).ajaxSuccess(function() {
               location.reload();
           });
       });
       </script>
       ```
   
 * I would reccomend you put it within your site’s js file though.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Favorites] Dynamically update favourites list after favourite button clicked](https://wordpress.org/support/topic/dynamically-update-favourites-list-after-favourite-button-clicked/)
 *  Thread Starter [Benjosity](https://wordpress.org/support/users/benjosity/)
 * (@benjosity)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/dynamically-update-favourites-list-after-favourite-button-clicked/#post-7308085)
 * Hi Nickylew
 * In the end I created a jQuery function that refreshed the page after the button
   had been clicked and the AJAX success event had gone through –
 *     ```
       $('.simplefavorite-button').click(function(event) {
           $(document).ajaxSuccess(function() {
               location.reload();
           });
       });
       ```
   
 * It’s not exactly what I wanted but it’s all I could figure out without any experience
   with AJAX and it essentially solves the main issue of not having any PHP loops
   update after clicking the favourite button.

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