SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2014
    0 Post(s)
    0 Thread(s)

    How to attach jquery library and plugins?

    Hello and thanks you for any input. I am starting to apply query to my webpage in development. First off when I go to download the library, I come to this: Nothing to download just a whole bunch of code I do not know what to do with it. In the head on my html I got this

    HTML Code:
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="Index.css">
    <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.10.4.custom.css" />
    <script src="/Users/Am/Desktop/Swift.Files/js/jquery-1.10.2.js"></script>
    <script src="/Users/AmDesktop/Swift.Files/js/jquery-ui-1.10.4.custom.js"></script>
    <script src="/Users/Am/Desktop/Swift.Files/js/jquery-ui-1.10.4.custom.min.js"></script>
    <script type='text/javascript' language='javascript' src='/Users/AM/Desktop/Swift.Files/index.js'></script>
    <link rel="stylesheet" type="text/css" href="Index.css">
    In my .js code folder I have this

    Code JavaScript:
    $(document).ready(function() {
       $('.home').mouseenter(function() {
               height: '+=10px'
    Last edited by Mittineague; Mar 8, 2014 at 12:55.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    West Springfield, Massachusetts
    194 Post(s)
    2 Thread(s)
    Quote Originally Posted by cire116 View Post
    First off when I go to download the library, I come to this: Nothing to download just a whole bunch of code I do not know what to do with it.
    When the page loads in your browser you have downloaded it. Just save it as jquery-2.1.0.js and put it where you need it to be.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Melbourne, AU
    460 Post(s)
    8 Thread(s)
    Yes, it is a bit confusing to see "Download" and then be taken to a page of code. But anyhow, as Allan says, you can just click File > Save As, or whatever you see at the top left of your screen. Or you can copy all tat code and paste it into a file of any name you choose, such as jquery.js.

    There are two ways to link to jQeury: by storing a file on your server, such as

    <script src=""></script>
    or you can link directly to an online version of jQuery, such as

    <script src="//"></script>
    Either way, make sure to put the link to the jQuery script before/above links to any other jQuery code on your page. Otherwise you'll get errors.

    Lastly, be careful not to make all your links only relative to folders on your computer. Paths like /Users/Am/Desktop/Swift.Files/ are going to fail once you pt your code online. If you are using server-side code like PHP, then set up a dev environment on your machine to mirror the online setup, so that your code will work in both places. You can download something like MAMP or XAMPP for that purpose.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts