Hey! I have a liquid element on my website, a scrolling marquee that says newsletter, for example. I don’t like how the general newsletter/email section looks on the theme, so I added this as a replacement. How do I make a pop up that appears on clicking this marquee? Also of course need to ensure the pop up form is customizable visually and actually integrates with the email/newsletter form
This is Amelia from PageFly - a Landing Page Builder App
Hi guillotinedrop,
I think that you can try to add some custom Javascript and HTML/CSS code to show the newsletter form in a popup after you click to your marquee .
You can try this HTML
Here is the CSS:
.popup {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
}
.popup-content {
background-color: #fefefe;
margin: 15% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
And finally is the Javascript code:
document.getElementById('newsletter-marquee').onclick = function() {
document.getElementById('newsletter-popup').style.display = 'block';
}
document.getElementsByClassName('close')[0].onclick = function() {
document.getElementById('newsletter-popup').style.display = 'none';
}
window.onclick = function(event) {
if (event.target == document.getElementById('newsletter-popup')) {
document.getElementById('newsletter-popup').style.display = 'none';
}
}
I hope that my solution works for you.
Best regards,
Amelia | PageFly