John Davidson

javascript - Add defer to Scripts functions.php

0 comments
Message:


In my site's functions.php script is like


add( 'scripts', '//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js' );

which shows on source code like


<script src="...jquery.min.js"></script>

want to add 'defer' to code like


<script src="...jquery.min.js" defer></script>

Please anyone guide me to achieve this?



My Answer:

Rate this post

3 of 5 based on 4518 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us