Title: span inside confirm button creates error
Last modified: March 9, 2022

---

# span inside confirm button creates error

 *  Resolved [deforner](https://wordpress.org/support/users/deforner/)
 * (@deforner)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/span-inside-creates-error/)
 * Hello Phil,
 * I added a span element inside the age_gate[confirm] button to create a cool hover
   effect. Sadly this results in an error. If a person clicks on the “Yes” button
   and hits the text inside the span element then the “you are not old enough” event
   gets triggered instead of passing the test. You can see it on my website right
   now.
    Is there any way I can add span elements inside of the buttons but keep
   the same behavior as intended?
 * Kind Regards,
    Dennis Möller
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fspan-inside-creates-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Phil](https://wordpress.org/support/users/philsbury/)
 * (@philsbury)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/span-inside-creates-error/#post-15510487)
 * Hi [@deforner](https://wordpress.org/support/users/deforner/),
 * Sorry for the slow response.
 * Yeah, that’s because adding a span has changed the element `target` that has 
   been clicked. I updated this in the latest release so you can do it now.
 * Thanks
    Phil

Viewing 1 replies (of 1 total)

The topic ‘span inside confirm button creates error’ is closed to new replies.

 * ![](https://ps.w.org/age-gate/assets/icon-256x256.png?rev=2783003)
 * [Age Gate](https://wordpress.org/plugins/age-gate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/age-gate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/age-gate/)
 * [Active Topics](https://wordpress.org/support/plugin/age-gate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/age-gate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/age-gate/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Phil](https://wordpress.org/support/users/philsbury/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/span-inside-creates-error/#post-15510487)
 * Status: resolved