Underscore.js has a popular method for throttling and debouncing functions to prevent them from firing multiple times when a window is resized. I found this delay function that works for times when you don’t need to load the entire underscore library to achieve a similar effect. // delay function to use on resize to prevent […]
Recently when upgrading an older site to WordPress 5.5 I noticed a javascript error in the console that read Uncaught TypeError: Cannot read property ‘msie’ of undefined. If you have a plugin or script that relied on an older version of jQuery it will no longer work because WordPress updated their jQuery version. In order […]
When working with JavaScript objects and arrays it is often tricky to reference the correct index of the data you need. These console functions allow you to visually see the structure so that job is a bit easier. Writes your object as a data table and also dropdown menu console.table($yourObject); Writes your object as a […]
Your website is the front door to your business. Choosing the right content management system (CMS) is essential for your business growth. HubSpot CMS consists of tools that all work together to give control of all your web assets. Basically, it takes the pain out of managing your website. Instead, it helps you focus on […]
Previously it was possible to download HubSpot template packs from the HubSpot marketplace. These were a collection of landing page, website page, blog, and email templates. The downside of these packs is they did not share any unified settings and they were not very portable between accounts. Now a group of templates, custom modules, and […]
If you are wanting to export a text based graphic icon or text symbol it is a good idea to convert it to outlines before exporting. If you don’t, when you embed the svg it will be looking for the web font being used and not look right. Select the text box containing the graphic […]
Problem: When transferring a HubSpot theme or template file to another portal global module’s menu disappears. The code snippet below sets the default menu tag to pull a default if it is not selected. {% set menu = module.menu is truthy ? menu(module.menu) : menu(‘default’) %} {% menu “menu” %} The post How to […]
Do you want to grab the url parameters and pass them to a button href or iframe src? This is common when you are running a paid ad campaign to a landing page that links to a form on another page. You want to track the source of the form submission by duplicating the url […]
The sass mixin below has default variable values for common breakpoints. But this mixin also allows you to write a custom value if needed. // default breakpknts $xs: “480px”; $sm: “600px”; $md: “799px”; $lg: “1010px”; $xl: “1280px”; @mixin media-min($size) { @media (min-width: $size) { @content; } } @mixin media-max($size) { @media (max-width: $size) { @content; […]
When using content staging in HubSpot you can easily test and preview design changes but the menu does not update to use the new staging domain. So you have to preview each page individually. This can be an issue when you are working on a HubSpot website rebrand and the client needs to click through […]