Hotspot Content Loads on Page
In this guide
Introduction
By default, all of the information for the hotspots is visible on page load by design. This generally assists in search engine indexing of content, improving accessibility, and progressive enhancement of the page.
The content is then hidden when the Draw Attention JavaScript is fired. In most cases, it takes less than a second until the content is hidden and barely noticeable.
But, there are cases where the content takes longer to be hidden:
- There is a slow internet connection. Hosting can also factor into how fast the page will load.
- There are a lot of other files and scripts loading on the page.
How to Fix
In cases like this, we recommend deferring the JavaScript to load after the Draw Attention image. Or, combine the scripts into a single combined file with a caching/optimization plugin.
Plugins like WP Rocket can assist in this manner, and they even have a nifty guide that goes over how to defer the JavaScript.
If you need to defer the JavaScript and are using something else, you may need to enter in what scripts are being deferred. Please add the following scripts in that case:
/wp-content/plugins/draw-attention-pro/public/assets/js/featherlight.min.js,
/wp-content/plugins/draw-attention-pro/public/assets/js/leaflet.js,
/wp-content/plugins/draw-attention-pro/public/assets/js/leaflet.responsive.popup-min.js,
/wp-content/plugins/draw-attention-pro/public/assets/js/public.js
Related Guides
-
JavaScript Error Displays or Flashes
-
Unable to Edit or Create
-
Hotspots Out of Place
-
Hidden Images Don’t Work