How do I link to a thickbox from an image map?

Discussion in 'JavaScript' started by lizzmo, Sep 30, 2008.

  1. #1
    I'm trying to have a thickbox appear after clicking on a link in an image map, but its just leading to a new page with the first image.
    I think its version 3.1
    Heres my code:

    <html>
    <head>
    <title>liz b morrison : imitation</title>
    <link rel="stylesheet" href="V6.css" type="text/css" media="screen">
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="thickbox.js"></script>
    </head>
    
    
    <body>
    <body background="woodbg.jpg">
    
    <div id='main'>
    <img src="photo_im.png" usemap="#immap" width="800" height="670" border="0">
    <map name="immap">
    <area shape="rect" coords="750,645,800,670" href="photoV6.html">
    <area shape="rect" coords="160,140,350,270" href="bwa01.jpg" class="thickbox" rel="gallery-sara"></a>
    <a href="bwa02.jpg" class="thickbox" rel="gallery-sara"></a>
    <a href="bwa04.jpg" class="thickbox" rel="gallery-sara"></a>
    <a href="bwa05.jpg" class="thickbox" rel="gallery-sara"></a>
    <a href="bwa03.jpg" class="thickbox" rel="gallery-sara"></a>
    <a href="bwa06.jpg" class="thickbox" rel="gallery-sara"></a>
    </map>
    </div>
    Code (markup):
    I combined my css and the thickbox css file
    I know css and html well, but I'm at somewhat of a loss when it comes to js

    http://lizbmorrison.net/imitationV6.html is the actual page

    any help would be really appreciated, thanks :)
     
    lizzmo, Sep 30, 2008 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    first of all, finish your html markup... having 2 body tags, neither of which is open... results in some crappy errors. define a doc type...

    thickbox is a jquery plugin. and http://lizbmorrison.net/jquery.js is a 404. hence, it won't work.

    other than that, you have changed the tb_init to include area.thickbox which is good to go imo.
     
    dimitar christoff, Oct 1, 2008 IP
    lizzmo likes this.
  3. lizzmo

    lizzmo Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank you! i knew it was probably just a dumb oversight on my part.
     
    lizzmo, Oct 1, 2008 IP