Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to add defer to script tag #3603

Open
hasakilol opened this issue Jan 11, 2024 · 1 comment
Open

how to add defer to script tag #3603

hasakilol opened this issue Jan 11, 2024 · 1 comment

Comments

@hasakilol
Copy link

It seems impossible to add defer to script tag.

I have a <script src="xxx" />. Now I want to add defer to it.
I tried many ways and couldn't create <script defer src="xxx" />.

@yogeshkudikala
Copy link

Use .attr to add defer="true" to your script tab
$('script').attr('defer', true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants