Title: Custom Close Button
Last modified: February 9, 2019

---

# Custom Close Button

 *  Resolved [scharreir](https://wordpress.org/support/users/scharreir/)
 * (@scharreir)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/custom-close-button-3/)
 * Hi, i’m using an html pop up that is fired in “onload” event and want to add 
   a custom close button
    this is what i have… and is not working. please help
 * <h2>Age Verification</h2>
    <hr /> Are you over 18 years old? <hr />
 * <button class=”PopUpButton” onclick=”jQuery.sgcolorbox.close();”>Yes</button>
   
   <button class=”PopUpButton” onclick=”window.location.href=’[http://doitweb.co.nz/vinoteca/age-restriction'”>No</button&gt](http://doitweb.co.nz/vinoteca/age-restriction&apos;”>No</button&gt);
 * Thank you…

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

 *  [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/)
 * (@sygnoossupport)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/custom-close-button-3/#post-11191401)
 * Dear [@scharreir](https://wordpress.org/support/users/scharreir/),
 * We have added “sg-popup-close” class to your code to make it work here:
 * <h2>Age Verification</h2>
    <hr /> Are you over 18 years old? <hr />
 * <button class=”PopUpButton sg-popup-close”>Yes</button>
    <button class=”PopUpButton”
   onclick=”window.location.href=’[http://doitweb.co.nz/vinoteca/age-restriction'”>No</button&gt](http://doitweb.co.nz/vinoteca/age-restriction&apos;”>No</button&gt);
 * This will work as expected now.
 *  Thread Starter [scharreir](https://wordpress.org/support/users/scharreir/)
 * (@scharreir)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/custom-close-button-3/#post-11194848)
 * Sorry to bother you again, but is not working.
    [http://doitweb.co.nz/vinoteca/checkout/](http://doitweb.co.nz/vinoteca/checkout/)
 * any idea of what I might be doing wrong?…
 *  Thread Starter [scharreir](https://wordpress.org/support/users/scharreir/)
 * (@scharreir)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/custom-close-button-3/#post-11195444)
 * I’ve found the problem
    in order to work, the popup needs to have the option **
   Dismiss on “esc” key:** checked, plus the class=”sg-popup-close” on the button.
   it is working, however now users can select “esc” to avoid click one of the button
   options… and is not what i need…
 *  [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/)
 * (@sygnoossupport)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/custom-close-button-3/#post-11196355)
 * Dear [@scharreir](https://wordpress.org/support/users/scharreir/),
 * Thank you for reporting this issue!
    It’s already included in our upcoming update.
   🙂
 * Meanwhile, you can fix it on your side, replacing the `PopupBuilder.js` file 
   below in the following directory: /wp-content/plugins/popup-builder/public/js/
 * Here’s the file: [https://www.codepile.net/pile/6J47qPOY](https://www.codepile.net/pile/6J47qPOY)
    -  This reply was modified 7 years, 3 months ago by [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/).

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

The topic ‘Custom Close Button’ is closed to new replies.

 * ![](https://ps.w.org/popup-builder/assets/icon-128x128.gif?rev=2698840)
 * [Popup Builder - Create highly converting, mobile friendly marketing popups.](https://wordpress.org/plugins/popup-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-builder/reviews/)

## Tags

 * [Custom button](https://wordpress.org/support/topic-tag/custom-button/)
 * [html popup](https://wordpress.org/support/topic-tag/html-popup/)

 * 4 replies
 * 2 participants
 * Last reply from: [Sygnoos Support](https://wordpress.org/support/users/sygnoossupport/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/custom-close-button-3/#post-11196355)
 * Status: resolved