Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  12] [ 6]  / answers: 1 / hits: 71869  / 7 Years ago, fri, may 5, 2017, 12:00:00

I know how to include CDN in HTML file.



<!DOCTYPE html>
<html>
<head>
<!-- jQuery library -->
<script src=https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js></script>
</head>
<body>
</body>
</html>


But what I am trying to do is:

I want to include CDN like jquery in my javascript file.



May be what I am trying to do is impossible.

Actually, I want to call BootstrapDialog.Confirm from my javascript file.

So, I want to include required CDN for BootstrapDialog in js file.

Then I can call BootstrapDialog.Confirm.



If my question is not reasonable, forgive me as I am a beginner.


More From » jquery

 Answers
5

You can do it in Javascript:



var jQueryScript = document.createElement('script');  
jQueryScript.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js');
document.head.appendChild(jQueryScript);

[#57889] Wednesday, May 3, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
denis

Total Points: 260
Total Questions: 87
Total Answers: 87

Location: Venezuela
Member since Thu, Jul 15, 2021
3 Years ago
;