HubSpot provides the ability to display a pop up form with various triggers (exit intent, after 7 seconds, etc.) But what if you want to show it immediately or when a button is clicked? Below is some javascript to help achieve this functionality.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | window.onload = function() { // add a delay to give time for the pop form to load setTimeout(function() { // trigger the opening of the pop up window.leadflows.dynoFactory.create(window.leadflows.lfConfig.leadFlows[0]).open(); /* can also be triggered on button click $(".cta").click(function(){ window.leadflows.dynoFactory.create(window.leadflows.lfConfig.leadFlows[0]).open(); }); */ }, 200); // window load }; |
New Industrial HubSpot Theme Released
Do you use HubSpot just for a blog or landing pages? No problem. this HubSpot theme contains the most common types of landing pages and a robust blog template to get you started. Learn More