I want a pop up to appear when a user clicks on the button on a site I’m developing. I have a button and I have modal (inner close). Essentially I want to combine the two, Is there a way of doing this that doesn’t involve using a plugin? site is https://beyondtouch.co.uk/
Hello @simonwr1976,
I went ahead and created a test page on your server, to which I added a modal element and a button element. The modal will open on a button click. Please check the settings.
I would suggest you please add a Button element and a Modal element. Now you need to inspect the Modal element through the browser inspector.
<div class="x-anchor x-anchor-toggle has-graphic e329-e5 m95-4 m95-6" tabindex="0" role="button" data-x-toggle="1" data-x-toggleable="e329-e5" data-x-toggle-overlay="1" aria-controls="e329-e5-modal" aria-expanded="false" aria-haspopup="true" aria-label="Toggle Modal Content"><div class="x-anchor-content"><span class="x-graphic" aria-hidden="true">
<span class="x-toggle x-toggle-burger x-graphic-child x-graphic-toggle" aria-hidden="true">
To do that, please do the following details.
data-x-toggleable = “e329-e5”
aria-controls=“329-e5-modal”
data-x-toggle-overlay=“1”
data-x-toggle=“1”
Go to the button and add these custom attributes
Hope it helps
Thanks
Thanks for the reply.
I’ve managed to get the button working. Is it now possible for me to hide the toggle? Will this break the button?
Hello @simonwr1976,
I would suggest you please add this custom CSS code to the modal element —> Customize —>Element CSS.
$el.x-anchor.x-anchor-toggle{display:none !important;}
The purpose of providing custom CSS is to show you how to add CSS code to your site. Writing custom CSS is outside the scope of our theme support. If you need more customization, you need to learn CSS and learn how to use the browser’s element inspector.In case if you have no idea about coding, you can subscribe to One, where customization questions are answered.
Hope it helps.
Thanks
That’s great thanks. It was more a question if hiding the modal would break the content being displayed. I’ve done that and it’s working fine, thanks.
Glad that we were able to help you.