I have created a blog subscription bar that appears fixed at the bottom of a visitors screen after a specified duration of time after the DOM load. I am trying to attach the jquery slideUp() function to the form submission but am running into some snags. Mainly- the form submits but does not slide away... Any help would be appreciated. Here is my script:
Mike -- thank you for the help, although it still appears to not be working for me. Could that be because the onFormSubmit() takes the $form as the argument? I need to hide the bar that is housing the form, not the form itself.
Is there something wrong with my JS? here is what I am looking at with the info that you gave me.
That should make the fixed subscribe bar #hideMe slide out after the form submits, correct? I can get it to work just fine with a standard form but as soon as it is a hubspot form it doesnt work.
Is it a public page? In other words can I have a look?
I'm self taught - so no JavaScript expert - but I've been fighting JavaScript to use HubSpot Forms in WordPress, Squarespace and even the HubSpot COS... so, I may be able to see something on your page.
Feel free to contact me directly if you don't want to post a link on here.
Mike at Webalite.com
The site is public -- however, I dont have the subscribe bar up on there yet because I dont have it fully functional Everything is working fine with getting it to slide in on screen and getting it to format properly I am just having issues getting it to slideup on submit.
when I use the javascript in the documentation it says that hbspt isnt defined and is giving me an error.
I am on the same page as you it sounds like, in terms of Javascript understanding at least. Self taught/always learning haha.
Sure Sure -- So I had all of that code running in the $(function () { // your script here } so it was effectively loaded after the DOM. I am using the Hubspot CMS with this. I will take a look at that article in a few moments. Thanks for all of the help so far. I appreciate it, Mike!
-BJ