Slider loading issue

This is standard behavior with javascript that is deferred or loaded in the footer. All the slides load in, and don’t get told to “be sliders” until the whole page has loaded. You can hide them with CSS first: #section-slider .single-slide-wrap { display: none; } And you can have the first slide be shown if … Read more

Is there an event or an other method that tells me the preview is loaded?

Yes, this is the way to detect when the preview has loaded: wp.customize.bind( ‘ready’, function() { wp.customize.previewer.bind( ‘ready’, function( message ) { console.info( ‘Preview is loaded’ ); } ); } ); This JS code should be enqueued at the customize_controls_enqueue_scripts action with customize-controls script as its dependency.

How can I defer these JS files?

What Are Async And Defer Attributes? Here’s what the async and defer attributes do: Async Attribute: The async attribute loads the script asynchronously. In other words, ensures that the script loads asynchronously along side the other contents of the page, after which it is executed. Defer Attribute: The defer attribute defers loading of the script. … Read more