Title: Ajax Scripts clashing
Last modified: August 31, 2016

---

# Ajax Scripts clashing

 *  Resolved [George](https://wordpress.org/support/users/quantum_leap/)
 * (@quantum_leap)
 * [10 years ago](https://wordpress.org/support/topic/ajax-scripts-clashing/)
 * I am filtering a listing grid with an ajax filtering plugin called facetWP and
   once the filter completes, the favorite buttons disappear. I am aware of the 
   facetWP callback function that gets called after some filtering occurs(‘facetwp-
   loaded’) but I don’t know what function I need to initialise from Favorites point
   of view so that I can refresh the favorite buttons once the filter has changed.
 * I tried enqueuing a script like this:
 *     ```
       jQuery(document).ready(function($){
   
           $(document).on('facetwp-loaded', function() {
       		 if (FWP.loaded) { // after initial pageload
                       new Favorites; // also tried Favorites()
                   }
   
            });
   
       });
       ```
   
 * but it didn’t work.
 * [https://wordpress.org/plugins/favorites/](https://wordpress.org/plugins/favorites/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [George](https://wordpress.org/support/users/quantum_leap/)
 * (@quantum_leap)
 * [10 years ago](https://wordpress.org/support/topic/ajax-scripts-clashing/#post-7416301)
 * Issue is resolved, I was only including the script on the frontend, it needed
   to be included also in the backend!

Viewing 1 replies (of 1 total)

The topic ‘Ajax Scripts clashing’ is closed to new replies.

 * ![](https://ps.w.org/favorites/assets/icon-128x128.png?rev=1677726)
 * [Favorites](https://wordpress.org/plugins/favorites/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/favorites/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/favorites/)
 * [Active Topics](https://wordpress.org/support/plugin/favorites/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/favorites/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/favorites/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [George](https://wordpress.org/support/users/quantum_leap/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/ajax-scripts-clashing/#post-7416301)
 * Status: resolved