Title: Triggering Javascript on List Load
Last modified: April 1, 2022

---

# Triggering Javascript on List Load

 *  [darrylldev](https://wordpress.org/support/users/darrylldev/)
 * (@darrylldev)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/triggering-javascript-on-list-load/)
 * Hey,
    Thanks a lot for this plugin, it’s come in very handy 🙂
 * Got a couple questions to help me integrate it with a system I’ve made.
    I’m 
   currently running some JavaScript and trying to trigger it after the My Favourite’s
   list loads in.
 * Is there any way to speed up how fast the My Favourite’s list (shortcode) loads
   in?
 * How can I trigger my JavaScript directly after the shortcode loads?
 * Thanks

Viewing 1 replies (of 1 total)

 *  Plugin Author [Takashi Matsuyama](https://wordpress.org/support/users/takashimatsuyama/)
 * (@takashimatsuyama)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/triggering-javascript-on-list-load/#post-15519404)
 * Hello, [@darrylldev](https://wordpress.org/support/users/darrylldev/)
    Thank 
   you for your rating and question.
 * **#Your JavaScript directly after the shortcode loads**
 * Perhaps you can do it by writing the following.
 *     ```
       jQuery(document).ajaxStop(function () {
           if (jQuery("#ccc-my_favorite-list").find(".list-ccc_favorite").length > 0) {
             alert("Your JavaScript"); /* Your JavaScript code */
           }
       });
       ```
   
 * Thanks
    -  This reply was modified 4 years, 2 months ago by [Takashi Matsuyama](https://wordpress.org/support/users/takashimatsuyama/).

Viewing 1 replies (of 1 total)

The topic ‘Triggering Javascript on List Load’ is closed to new replies.

 * ![](https://ps.w.org/my-favorites/assets/icon.svg?rev=2459439)
 * [My Favorites](https://wordpress.org/plugins/my-favorites/)
 * [Support Threads](https://wordpress.org/support/plugin/my-favorites/)
 * [Active Topics](https://wordpress.org/support/plugin/my-favorites/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-favorites/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-favorites/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Takashi Matsuyama](https://wordpress.org/support/users/takashimatsuyama/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/triggering-javascript-on-list-load/#post-15519404)
 * Status: not resolved