0

I want to reference JQuery in an external JS file. Since the code i will be using is going to be a script, i don't have a page to load it from.

Does anyone know how to load JQuery into a JS file without the use of a html page?

Sorry if this is already answered.

Thank You.

2

1 Answer 1

1

You can add <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

element to any webpage which already loaded before your external js file is loaded and use jQuery object in your external file. at runtime it will find the object.

Sign up to request clarification or add additional context in comments.

1 Comment

The whole point is to load it without using a web page? straight from the .js file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.