Jump to content

How to install jQuery on Linux?

Recommended Posts

Newbie alert...

I am an experienced Un*x sysadmin and programmer. However, JavaScript and its huge ecosystem can be overwhelming. My main target now is Node.js.

I have been locating, downloading and installing a lot of packages:

npm install this
npm install that
npm install the-other
npm install one-more

The input is always whole directories.

I just found out that jQuery is very important, so I decided to install it. The problem is that in the official site they offer one single file. It is ASCII with the extension *.js


That doesn't feel right. A rather large system, contained in one text file?


-Ramon F. Herrera
JFK Numbers


Link to post
Share on other sites

Hello, @Raymond Herrera

Please try this code,To how to install jQuary on Linux.

Get jQuery up and running in a minute or less:

Insert this into your HTML (most commonly in the head, but you can throw it before the end body tag too):

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

Then place a script element after your jQuery one. This would alert 'hello' after the DOM is ready.

<script>$(function() { alert('hello') });</script>

Using jQuery locally:

After you get a feel, try downloading jQuery locally to your computer, and link it from your script file. The structure is like so:



        <script src="js/jquery.js"></script>
        <script>$(function() { alert('hi') })</script>

You have the advantage of relying on your saved version offline if you don't have the Internet/Wi-Fi. You can also make custom edits to the jQuery source and modify it at will.

I hope this code will be useful for you.

Thank you.


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...