Created
October 29, 2020 15:54
-
-
Save brianpurkiss/d15b6b3a344178de7dae39caf487f079 to your computer and use it in GitHub Desktop.
Defer inline javascript to after DOMContentLoaded
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window.addEventListener('DOMContentLoaded', function() { | |
(function($) { | |
console.log('Hello world.'); | |
})(jQuery); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment