This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Vasya Varl
over 8 years

How to test jQuery

Can some help. I’m used to test my code in “JS.bin” or “Codecademy labs” (js course). But when I’m trying to do the same for jQuery in JS.bin nothing happen (I insert code to Javascript section, even tried to add into script tag index(html) file) and CodeLab says some error. Now I use the window in jQuery course, but it’s not always comfortable (for me)

Answer 55e69eab937676361700021f

1 vote

Permalink

In JSBIN add a library from the pull-down. jQuery 1.11.3.min.js should be in the list. In your profile is Codebits. Create New. Click the title to give it a name. In the HTML tab add a script tag below your style sheet and above your script.js tag

<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>

Same would apply if you just want to work on your own computer with a text editor and browser. Merge the library from a CDN and you’ve got jQuery. No local file necessary.

If you really want to go all out and be able to work offline, then download min version and save it on your machine in a js folder. Then in your HTML write a conditional that loads the local file if an online resource cannot be found. A little digging and you should be able to come up with several examples of this method.

points
Submitted by Roy
over 8 years

1 comments

Vasya Varl over 8 years

Thank you