Categories
Apply to

Defer Parsing of JavaScript With YouTube Videos – Scott DeLuzio

Add another empty parameter src=””. This replaces the src we just changed to data-src Your should look something like this now: THE JAVASCRIPT The we set up by itself won’t load the video correctly. We’ll use some JavaScript to get it to load correctly. function init() { var vidDefer = document.getElementsByTagName(‘iframe’); for (var i=0;

Source: Defer Parsing of JavaScript With YouTube Videos – Scott DeLuzio

Leave a Reply

Your email address will not be published. Required fields are marked *