Title: JavaScript Callback
Last modified: March 10, 2021

---

# JavaScript Callback

 *  [mjpr](https://wordpress.org/support/users/mjpr/)
 * (@mjpr)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-callback/)
 * Hello!
 * Is it possible to hook on a javascript-callback?
    I need a callback to solve 
   two issues.
 * First, i have to count the results of the actual store-search to print “found
   X stores” above the result-list.
 * Second, i need an own overlay for the info-popup in the map-view, so i have to
   hook on the marker-click.
 * Is that possible with the plugin?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tijmen Smit](https://wordpress.org/support/users/tijmensmit/)
 * (@tijmensmit)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-callback/#post-14165497)
 * The first thing you can do with the [this jQuery function](https://api.jquery.com/ajaxcomplete/),
   just load a separate file and run the code from there.
 * The second one requires you to modify the [core code](https://plugins.trac.wordpress.org/browser/wp-store-locator/tags/2.2.234/js/wpsl-gmap.js#L1869).
 * The JS code in the 3.0 update will support [hooks](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-hooks/),
   so that will make things much easier. I don’t have a release date yet for this
   update, but hopefully in a few weeks there should be a public beta version.
    -  This reply was modified 5 years, 2 months ago by [Tijmen Smit](https://wordpress.org/support/users/tijmensmit/).

Viewing 1 replies (of 1 total)

The topic ‘JavaScript Callback’ is closed to new replies.

 * ![](https://ps.w.org/wp-store-locator/assets/icon-256x256.jpg?rev=1007784)
 * [WP Store Locator](https://wordpress.org/plugins/wp-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-store-locator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tijmen Smit](https://wordpress.org/support/users/tijmensmit/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/javascript-callback/#post-14165497)
 * Status: not resolved