How to Add Retina Images to HubSpot Email and Page Templates

HubSpot CMS handles responsive images by default by creating different image sizes for different screen widths (using srcset). But with retina display images, you want to load higher resolution images and scale them down to 100%. Thankfully you can add ?noresize to the end of your image source to disable this dynamic resizing. In the […]

How to Change Favicon with JavaScript

This code comes in handy when you don’t have access to the head of the page and need to change the favicon. (function() { var link = document.querySelector(“link[rel*=’icon’]”) || document.createElement(‘link’); link.type = ‘image/x-icon’; link.rel = ‘shortcut icon’; link.href = ‘https://yourdomain.com/favicon.ico’; document.getElementsByTagName(‘head’)[0].appendChild(link); })(); The post How to Change Favicon with JavaScript appeared first on Bootstrap Creative.

How to Increase Business Online Visibility and Local SEO

Every business wants to be found online. Having a professional website is a good starting point but you also need to be found on search engines, maps, voice search like Alexa, and business review sites like Yelp. Below is a list of websites every business should be listed on. If you have just one business […]

Questions to Ask a Before Redesigning Your B2B Website

Website builders are a dime a dozen, but a lead generating website is a rare jewel. These websites are more strategic and help you generate new business. Below is a list of common questions I ask in order to recommend a solution to help them. List of questions to ask before you start a new […]

Web Accessibility Evaluation Tool Code Snippets

Below are some code snippets to help resolve accessibility errors found using the WAVE accessibility evaluation tool. Remove redundant title text $(‘.slick-slide-inner-wrapper img, .hs_cos_wrapper_type_logo img, .hs-image-widget’).removeAttr(“title”); window.addEventListener(‘load’, function() { $(‘.cta_button’).removeAttr(“title”); }) Empty links used for javascript behavior like dropdown menus $(‘.hs-menu-item a[href=”javascript:;”]’).each(function() { $(this).prepend(‘<span class=”sr-only”>child menu</span>’); }); .sr-only CSS class to help bring meaning to […]

The Best HubSpot Website Designers & Developers – North America

Below is a list of the top HubSpot CMS web designers and developers I recommend. Everyone listed below is located in North America. The Top HubSpot CMS Developers and Designers in the United States Jacob Lett Specialization: HubSpot website design & digital marketing Michigan, USA https://bootstrapcreative.com/contact/ Amy Andrews Specialization: HubSpot website design & development New […]

HubSpot onFormSubmit and Other JavaScript Events

When embedding a HubSpot form using the JavaScript script tag it is common to want to apply some of your own functions after the form has submitted. This can be used for adding conversion pixels for Google Ads and Facebook after the form is submitted. Another use case is modifying the form markup after the […]

Throttle or Delay JavaScript Functions When Window is Resized [code snippet]

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 […]

Uncaught TypeError: Cannot read property ‘msie’ of undefined when upgrading to WordPress 5.5

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 […]

Console Log JavaScript Objects to See Data Structure [code snippet]

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 […]