Scrolling Form

I added the script in this post to my landing page but it isn’t working for me. I contacted HS support and they said the js was firing with no errors. Can anybody help and see if it’s something I did wrong? The goal is to have the form scroll with you on desktop. I’ve done something similar in the past with a fixed position in the css on a desktop only module but with this longer form, I’m afraid some smaller screens might cut off the bottom of the form.

Script

https://community.hubspot.com/t5/CMS-Development/From-to-stay-put-when-scrolling/td-p/207099

My landing page

http://info.randallreilly.com/truck-utilization-poll-sms-consent-cab-2020

My footer HTML

Hi @allisonnance ,

There’s a JS console error when the page loads:

Uncaught TypeError: $(...).stick_in_parent is not a function

Probably the library isn’t loading in time for the call.

To be honest, I’d do this with CSS unless you must absolutely have it be sticky on Internet Explorer 11 (see the caniuse.com entry for position:sticky), because the CSS will work for basically everything else.

The CSS below should do it for this page, although I would recommend that you add a class to that second column in the template instead and target it using your new class name (e.g. add the class sticky-form and then replace the first line below with .sticky-form )

.span6.widget-span.widget-type-form {
 position: -webkit-sticky; /*Safari*/
 position: sticky;
 top: 0;
}

Hope that helps. Let me know how you get on!

Cheers,

Mike

---
Did I answer your question? If your question is answered, please mark it as a solution. If you need more help, hit that big orange ‘Reply’ button!

I am trying to create a scroll box from top to bottom scroll option within a quote can you please help me?