Hey @wrbkelley,
Thanks for writing.
We saw your working expand example and, we looked at your code.
Here’s what we think:
1) First (as you probably know), this isn’t a plugin-related problem. It’s more of a custom code exercise for jQuery, HTML, and CSS.
2) We don’t see any expand classes in the markup for your popup. But, we see 10 instances of that class in your Register For Expert Advice form at the bottom of the page.
Since the expand class isn’t in the popup anywhere, this LOC (line of code) won’t do anything for that popup.
$( ".expand" ).wrapAll( "<div class='expand-div' />");
Suggestion: Try adding the expand class to the elements you want in the form inside the popup.
3) You’ll definitely see the console.log message because your listener is correct. But, this next line won’t do anything for that popup either since your previous LOC doesn’t do the wrapping you expect.
$(".expand-div").slideToggle(1000);
Anyway, when we randomly add the expand class to a form field in the popup, your slideToggle() call fires.
Here’s a demo.
https://share.wppopupmaker.com/12uLoKpD
We hope that helps.
Please open a new thread if you have any questions specific to Popup Maker.
Have a great day 🙂
-
This reply was modified 3 years, 9 months ago by
mark l chaves. Reason: Corrections
So it turns out this post was unnecessary. I discovered that I can get the form to expand if the popup is the only Gravity form on the page. I was trying to use the javascript on a page with two Gravity forms and one conflicted with the other one. Once i moved it to its own page, it worked perfectly.
Hello @wrbkelley – thanks for letting us know!
Happy to hear that it worked properly for you.
Yes, you are correct! Note that most form plugins do not support using the same form in more than one place on the page. Since popups are hidden in the footer of your site and on the page, if the same form is inserted on the page elsewhere it can cause rendering or submission issues.
Hey if you have a moment, could you please rate the plugin?
We’d appreciate sharing your experience with everyone.
Have a great day!
🙂