Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Javascript not linked correctly?

    Hi,
    I'm not sure what I am doing wrong, but my prettyPhoto js is not being read by my html file. I have put the script references in the head, and put a rel link next to the photos... I could use a 2nd set of eyes to look and see what I might be doing wrong. Head code here:
    Code:
    <script src="js/jquery-1.3.2.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
    <script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
    and photo code:
    Code:
    <div align="center"><a href="images/shelter_images/blast-rated-lab.jpg" rel="prettyPhoto[gallery]"><img src="images/shelter_images/blast rated lab-t.jpg" alt="Blast Rated Lab" width="120" height="80" /></a>              &nbsp;&nbsp;<a href="images/shelter_images/guard_house.jpg" rel="prettyPhoto[gallery]"><img src="images/shelter_images/guard_house-t.jpg" alt="Guard House" width="120" height="80" /></a> &nbsp;&nbsp;<a href="images/shelter_images/PCR-Building.jpg" rel="prettyPhoto[gallery]"><img src="images/shelter_images/pcr-building-t.jpg" alt="PCR Building" width="120" height="80" /></a>&nbsp;&nbsp;<img src="images/shelter_images/advanced_laboratories_t.gif" rel="prettyPhoto[gallery]" alt="Advanced Laboratories" width="126" height="80" /> &nbsp;&nbsp;<img src="images/shelter_images/metal_cabinets_and_laminated_counters_t.gif" rel="prettyPhoto[gallery]"  alt="Cabinets &amp; Laminated Counters" width="120" height="80" /> &nbsp;&nbsp;<img src="images/shelter_images/raised_flooring_t.gif" rel="prettyPhoto[gallery]"  alt="Raised Flooring" width="122" height="80" />&nbsp;&nbsp;<img src="images/shelter_images/full_kitchens_t.gif" rel="prettyPhoto[gallery]" alt="Full Kitchens" width="101" height="80" /></div>

  • #2
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    please note---

    one more thing - I know the last 4 images do not have links. They are placeholders.
    thanks!

  • #3
    New to the CF scene
    Join Date
    Aug 2013
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Nevermind - I apologize. I figured it out.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,634
    Thanks
    0
    Thanked 649 Times in 639 Posts
    <link> tags go in the <head> of the page

    <script> tags go just before the </body>

    so you would never have a <link> tag between <script> tags.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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