You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

use jQuery for js file to create library

edited May 7, 2018 7:00AM in Integration 6 comments

Summary

use jQuery for js file to create library

Content

Hi All,

 

I need to create one java script function, but for that has dependency on jQuery.

 

in html file we can write script tag to add it.

 

But i this case as I have import only in js file, I have used below code which is not working.

 

var script = document.createElement('script');

script.src = '//code.jquery.com/jquery-2.0.0.min.js';

document.getElementsByTagName('head')[0].appendChild(script);

 

 

 

 

Please provide inputs if somebody has already tried it.

 

Thanks,

Abhi

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!