Title: Execute function after ajax loads content
Last modified: August 31, 2016

---

# Execute function after ajax loads content

 *  [Tiago ADPS](https://wordpress.org/support/users/tiago-adps/)
 * (@tiago-adps)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/execute-function-after-ajax-loads-content/)
 * Hi, great plugin!
 * How can I execute a jquery function after ajax finishes loading new content?
 * TY!
 * [https://wordpress.org/plugins/yith-infinite-scrolling/](https://wordpress.org/plugins/yith-infinite-scrolling/)

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

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/execute-function-after-ajax-loads-content/#post-6962169)
 * Hi,
    maybe you can use this event ‘yith_infs_added_elem’ that was triggered after
   that the new content was loaded completly.
 * Best regards.
 *  Thread Starter [Tiago ADPS](https://wordpress.org/support/users/tiago-adps/)
 * (@tiago-adps)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/execute-function-after-ajax-loads-content/#post-6962333)
 * Hi,
 * Is there some sort of example you could point me to?
    I googled ‘yith_infs_added_elem’
   but found nothing
 * Thx
 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/execute-function-after-ajax-loads-content/#post-6962338)
 * Hi,
    you have to do something like this
 *     ```
       jQuery(document).on('yith_infs_added_elem', function(){
        // here code you want to execute
       });
       ```
   

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

The topic ‘Execute function after ajax loads content’ is closed to new replies.

 * ![](https://ps.w.org/yith-infinite-scrolling/assets/icon.svg?rev=3303151)
 * [YITH Infinite Scrolling](https://wordpress.org/plugins/yith-infinite-scrolling/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-infinite-scrolling/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-infinite-scrolling/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-infinite-scrolling/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-infinite-scrolling/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-infinite-scrolling/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/execute-function-after-ajax-loads-content/#post-6962338)
 * Status: not resolved