Title: JS initialization function for buttons
Last modified: August 18, 2022

---

# JS initialization function for buttons

 *  [ultraZB](https://wordpress.org/support/users/zboekhoudt/)
 * (@zboekhoudt)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/js-initialization-function-for-buttons/)
 * I’m using your plugin’s modal feature for a contact form.
 * I have a button on the page that opens when you click a modal (plugin: Mega Addons
   for WPBakery Page Builder) contact form (plugin: contact form 7).
 * However, when selecting the attributes for the filter (plugin:Avalon23) (Ajax
   is activated). The pop-up doesn’t open. I have to refresh the page for the pop-
   up to open.
 * I’ve contacted Avalon23 support, and they’ve informed me that the problem is 
   the incompatibility of this functionality (modal) with ajax mode.
 * To have the modal open, I would need the JS initialization function for buttons.
 * Do you have a page where I can find this code?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjs-initialization-function-for-buttons%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘JS initialization function for buttons’ is closed to new replies.

 * ![](https://ps.w.org/mega-addons-for-visual-composer/assets/icon-128x128.jpg?
   rev=2205499)
 * [Mega Addons For WPBakery Page Builder](https://wordpress.org/plugins/mega-addons-for-visual-composer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mega-addons-for-visual-composer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mega-addons-for-visual-composer/)
 * [Active Topics](https://wordpress.org/support/plugin/mega-addons-for-visual-composer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mega-addons-for-visual-composer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mega-addons-for-visual-composer/reviews/)

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [ultraZB](https://wordpress.org/support/users/zboekhoudt/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/js-initialization-function-for-buttons/)
 * Status: not resolved