In the comments section of my tutorial titled Adding a horizontal opt-in form in Genesis, a reader asked:
Got this form to work perfectly!
Only question is finding a way for people to collapse it if they’re already subscribed or just want to hide it on the screen. I want it to show up by default, otherwise I’d add a collapse-o-matic code or something.
In this article I share how we can use jQuery's slideToggle to let users collapse and expand the opt-in form below header on front page in Genesis.
Opened (Default state):
This tutorial uses Lifestyle Pro and should work in any Genesis theme with minor changes.
Install and activate Genesis eNews Extended plugin.
Create a file named say, home.js in child theme's
js directory (create, if not existing) having the following:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.