Title: Re-initialize the ajax javascript?
Last modified: August 31, 2016

---

# Re-initialize the ajax javascript?

 *  Resolved [mokes](https://wordpress.org/support/users/mokes/)
 * (@mokes)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/re-initialize-the-ajax-javascript/)
 * I’ve got some other ajax code on my site, and have the opportunity to call former
   functions, when the ajax call’s complete—is there a line of code I can inject,
   in order to reinitialize the functionality of this plugin?
 * [https://wordpress.org/plugins/malinky-ajax-pagination/](https://wordpress.org/plugins/malinky-ajax-pagination/)

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

 *  Plugin Author [craigramsay](https://wordpress.org/support/users/malinkymedia/)
 * (@malinkymedia)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/re-initialize-the-ajax-javascript/#post-7233319)
 * All JavaScript is wrapped in an Immediately Invoked Function so you could call
   this to set up the the pagination again. It does expect jQuery to be passed as
   a parameter though.
 *     ```
       <script>
       MalinkyAjaxPaging(jQuery);
       </script>
       ```
   
 *  Thread Starter [mokes](https://wordpress.org/support/users/mokes/)
 * (@mokes)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/re-initialize-the-ajax-javascript/#post-7233331)
 * Thanks for the quick response! Unfortunately, the (other plugin) ajax code is
   being executed in the header (argh!), and it’s not seeing MalinkyAjaxPaging as
   a valid function, even if I try linking the main.js file from your plugin, above
   the executable code.
 *  Plugin Author [craigramsay](https://wordpress.org/support/users/malinkymedia/)
 * (@malinkymedia)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/re-initialize-the-ajax-javascript/#post-7233333)
 * I see, the script would need to run in the footer as it needs to locate the correct
   selectors and navigation in order to know where to add the new posts and to replace
   the navigation.
 *  Thread Starter [mokes](https://wordpress.org/support/users/mokes/)
 * (@mokes)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/re-initialize-the-ajax-javascript/#post-7233334)
 * Thanks, again, for the help, and the great plugin. Obviously the issue is on 
   my end at this point. So I’ll have to see if I can come up with some some convoluted
   solution to remedy the issue.
 *  Plugin Author [craigramsay](https://wordpress.org/support/users/malinkymedia/)
 * (@malinkymedia)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/re-initialize-the-ajax-javascript/#post-7233335)
 * I’m glad you like the plugin and sorry I can’t help out further. I hope you can
   get things fixed and carry on using it.
 * Thanks

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

The topic ‘Re-initialize the ajax javascript?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/malinky-ajax-pagination_e2c6ba.svg)
 * [Ajax Pagination and Infinite Scroll](https://wordpress.org/plugins/malinky-ajax-pagination/)
 * [Support Threads](https://wordpress.org/support/plugin/malinky-ajax-pagination/)
 * [Active Topics](https://wordpress.org/support/plugin/malinky-ajax-pagination/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/malinky-ajax-pagination/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/malinky-ajax-pagination/reviews/)

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [craigramsay](https://wordpress.org/support/users/malinkymedia/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/re-initialize-the-ajax-javascript/#post-7233335)
 * Status: resolved