Title: Add functionality on click
Last modified: June 7, 2022

---

# Add functionality on click

 *  Resolved [adriana97](https://wordpress.org/support/users/adriana97/)
 * (@adriana97)
 * [4 years ago](https://wordpress.org/support/topic/add-functionality-on-click/)
 * Hello,
 * I need dynamic href for button inside popup which is opening on click.
    I tried
   to write on clik function on button oppening popup but it didn’t work. How can
   I do that??
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadd-functionality-on-click%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Bel](https://wordpress.org/support/users/belimperial/)
 * (@belimperial)
 * [4 years ago](https://wordpress.org/support/topic/add-functionality-on-click/#post-15717944)
 * Hi [@adriana97](https://wordpress.org/support/users/adriana97/)
 * Thanks for writing in, and we’re sorry you have trouble for your click function.
 * We’ll ask our development team to have a look at the dynamic href (URL) and get
   back to you.
 * Could you also share to us the function you are using to help our developers?
   Please share it to us by opening a support ticket to our website for security.
   Here’s how to:
 * 1. Go to [https://wppopupmaker.com/support/#submit-a-support-ticket](https://wppopupmaker.com/support/#submit-a-support-ticket)
   
   2. Click Other Support 3. Fill in the form 4. Click SUBMIT
 * Here’s a screen capture for your reference: [https://share.wppopupmaker.com/geudGzB4](https://share.wppopupmaker.com/geudGzB4)
 * Thank you, and we look forward to your response.
 *  Plugin Support [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * (@mlchaves)
 * [4 years ago](https://wordpress.org/support/topic/add-functionality-on-click/#post-15718224)
 * Hey [@adriana97](https://wordpress.org/support/users/adriana97/),
 * We’d love to help.
 * Can you give us more details? What do you exactly mean by _dynamic href_ in a
   button? Do you want to pass a link into a popup and insert that into an `a` tag’s`
   href` attribute? Where will that link come from? I.e., how will you pass the 
   dynamic href?
 * Please follow this guide to save time and from going back and forth.
 * [https://wordpress.org/support/topic/construct-your-support-thread-like-this-to-get-the-fastest-support/](https://wordpress.org/support/topic/construct-your-support-thread-like-this-to-get-the-fastest-support/)
 * Cheers!
 *  Thread Starter [adriana97](https://wordpress.org/support/users/adriana97/)
 * (@adriana97)
 * [4 years ago](https://wordpress.org/support/topic/add-functionality-on-click/#post-15719054)
 * Hello,
    I want to pass a link to button inside popup. I thought to do that my
   data attribute. When clicking on button(which opens popup) transfer that buttons
   data attribute with is a link to button inside popup.
 * Button opening popup: [https://prnt.sc/EGkbEeOEWaBk](https://prnt.sc/EGkbEeOEWaBk)
   
   Button inside the popup with dynamic link [https://prnt.sc/BvHIV7IDPU99](https://prnt.sc/BvHIV7IDPU99)
 *  Plugin Support [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * (@mlchaves)
 * [4 years ago](https://wordpress.org/support/topic/add-functionality-on-click/#post-15722265)
 * Hey [@adriana97](https://wordpress.org/support/users/adriana97/),
 * Thanks for clarifying and for sharing those screen captures. When we visited 
   your site, we didn’t get any popups to launch. And, we also saw many JavaScript
   errors in the console.
 * You’ll need to fix all that and make sure your popup click triggers are in place
   and working.
 * Once that’s done, you can use custom code to pass in a URL to your popup and 
   insert that URL as a button link inside your popup.
 * Here’s a code example you can use and tweak for your needs.
 * [https://gist.github.com/marklchaves/49fcb165484053efa3916d97d911cd47](https://gist.github.com/marklchaves/49fcb165484053efa3916d97d911cd47)
 * You need to be comfortable with PHP, JavaScript, and jQuery or work someone who
   is.
 * Here’s a live demo on a test site.
 * [https://streetphotography.blog/dynamic-link-popup/](https://streetphotography.blog/dynamic-link-popup/)
 * You should see a button that passes Popup Maker’s homepage URL to a popup and
   inserts the URL into the button’s link inside the popup.
 * We hope that helps.
 * Let us know if you need anything else.
 * Have a great day 🙂
 *  Thread Starter [adriana97](https://wordpress.org/support/users/adriana97/)
 * (@adriana97)
 * [4 years ago](https://wordpress.org/support/topic/add-functionality-on-click/#post-15723229)
 * Thanks a lot
 *  [Bel](https://wordpress.org/support/users/belimperial/)
 * (@belimperial)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/add-functionality-on-click/#post-15724950)
 * Hi [@adriana97](https://wordpress.org/support/users/adriana97/)
 * Awesome! We’re happy to help.
 * Hey, if you have a moment, could you [rate and review the plugin](https://wordpress.org/support/plugin/popup-maker/reviews/?rate=5#rate-response)?
 * We’d appreciate sharing your experience with everyone.
 * Have a great day 🙂

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

The topic ‘Add functionality on click’ is closed to new replies.

 * ![](https://ps.w.org/popup-maker/assets/icon-256x256.gif?rev=3097653)
 * [Popup Maker - Boost Sales, Conversions, Optins, Subscribers with the Ultimate WP Popup Builder](https://wordpress.org/plugins/popup-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-maker/reviews/)

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [href](https://wordpress.org/support/topic-tag/href/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [link](https://wordpress.org/support/topic-tag/link/)

 * 6 replies
 * 3 participants
 * Last reply from: [Bel](https://wordpress.org/support/users/belimperial/)
 * Last activity: [3 years, 12 months ago](https://wordpress.org/support/topic/add-functionality-on-click/#post-15724950)
 * Status: resolved