Load a script after a web page is loaded

So I was writing an A/B testing and was looking for the default jQuery method for loading an external script. So using the jQuery.getScript, you can do exactly that; load a script after a web page is already loaded and perform actions once it is loaded into DOM.

See the Pen jQuery.getScript demo by Fahad Murtaza (@fahdi) on CodePen.light


Notice: Theme without comments.php is deprecated since version 3.0.0 with no alternative available. Please include a comments.php template in your theme. in /var/www/fahdmurtaza.com/public_html/wp-includes/functions.php on line 4019

Leave a Reply

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