SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Absolute Jquery Beginner

    So,

    I'm delving into Jquery for a project I'm working on. I need an external page to popup in an overlay. I found the perfect solution here:

    http://flowplayer.org/tools/demos/overlay/external.html

    My problem? I cannot get it to work, even as a stand alone example, copying and pasting the code.

    I link the jquery library in the head as so:

    <script type="text/javascript" src="jquery-1.7.1.min.js"></script>

    I paste the javascript from the above example directly into a sample index.html I made, in the head tag. I copy and paste the css into the style.css file connected to the index.

    All I get is a button, a bunch of repeating images (that are supposed to show up in the overlay) and... a non-working example.

    I do notice that when I go to download the jquery library, when I click on "download" it just shows the javascript in the browser. I had to copy and paste all of it into a new file and save it as "jquery-1.7.1.min.js"

    Any help would be much appreciated!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by kennyk3 View Post
    I had to copy and paste all of it into a new file and save it as "jquery-1.7.1.min.js"
    Sounds like you did things right. First question, then: where did you save the jQuery file? Is it in the same folder as the .html file?

  3. #3
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,197
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    On a side note i personally don't use local references of the jQuery library anymore, i now use the Google code CDN which is a lot faster and always changes with each new version that comes out.

    https://ajax.googleapis.com/ajax/lib.../jquery.min.js

    If you want a version specific to a plugin then you can simply use the below URL for example and change the version number until you find the correct release.

    https://ajax.googleapis.com/ajax/lib.../jquery.min.js

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, thanks so much for your answers.

    @ralph.m, The jQuery file is saved in the same folder. I'm just testing it on my computer. I have xampp, so I'm testing it on that.

    @SgtLegend, Thanks, I tried this. It still looks funny, but I think I'm headed in the right direction.


Tags for this Thread

Bookmarks

Posting Permissions

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