kuul13
08-12-2009, 07:29 PM
Hi
I am trying to build a travel page for my personal website.. I am very new to javascript/css so I got a template from the web and trying to work on it. But struck in middle of it. The travel page has the following functionality:
1. page contains thumbnail photos [functional]
2. on hover, the thumbnail photos fade in/out [functional]
3. on click it opens the image on top and user can navigate to next photo
4. on hover I want to show the image in a popup (either 3 or 4)
3 is also functional but if I add multi-line photos then it doesn't work.
If HTML file has following code then it works
<body>
<div id="site">
<div id="content">
<h3 id="welcome">Travel Photos</h3>
</div>
<div id="content_img2">
<ul class="gallery_demo_unstyled gallery_demo galleria1">
<li class=""><img rel="img/lasvegas.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/lasvegas.gif" alt="Vegas" title="Vegas"></li>
<li class=""><img rel="img/wildwoods.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/wildwoods.gif" alt="Wildwoods" title="Wildwoods"></li>
</ul>
</div>
</div>
</body>
...but if I add multi-line photos, it doesn't work:
<body>
<div id="site">
<div id="content">
<h3 id="welcome">Travel Photos</h3>
</div>
<div id="content_img2">
<ul class="gallery_demo_unstyled gallery_demo galleria1">
<li class=""><img rel="img/lasvegas.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/lasvegas.gif" alt="Vegas" title="Vegas"></li>
<li class=""><img rel="img/wildwoods.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/wildwoods.gif" alt="Wildwoods" title="Wildwoods"></li>
</ul>
</div>
<div id="content_img2">
<ul class="gallery_demo_unstyled gallery_demo galleria1">
<li class=""><img rel="img/nyc.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/nyc.gif" alt="NYC" title="NYC"></li>
</ul>
</div>
</div>
</body>
I then tried to add the code to show the thumbnail images as popup if user hovers over the image with functionality 1 and 2 intact. But it was not working with current style/JS.
To show how I want the popup, I added a the following code after <div id="content_img2">
<a class="thumbnail" href="#thumb"><img style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/dc.gif" alt="DC" title="DC"><span><img src="js/travelogy/dc.gif" /><br />Simply beautiful.</span></a>
The complete sample code is attached as .zip file. I would appreciate if someone can help me with this as I am totally struck and have no clue how to resolve this. Thanks in Advance!!
I am trying to build a travel page for my personal website.. I am very new to javascript/css so I got a template from the web and trying to work on it. But struck in middle of it. The travel page has the following functionality:
1. page contains thumbnail photos [functional]
2. on hover, the thumbnail photos fade in/out [functional]
3. on click it opens the image on top and user can navigate to next photo
4. on hover I want to show the image in a popup (either 3 or 4)
3 is also functional but if I add multi-line photos then it doesn't work.
If HTML file has following code then it works
<body>
<div id="site">
<div id="content">
<h3 id="welcome">Travel Photos</h3>
</div>
<div id="content_img2">
<ul class="gallery_demo_unstyled gallery_demo galleria1">
<li class=""><img rel="img/lasvegas.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/lasvegas.gif" alt="Vegas" title="Vegas"></li>
<li class=""><img rel="img/wildwoods.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/wildwoods.gif" alt="Wildwoods" title="Wildwoods"></li>
</ul>
</div>
</div>
</body>
...but if I add multi-line photos, it doesn't work:
<body>
<div id="site">
<div id="content">
<h3 id="welcome">Travel Photos</h3>
</div>
<div id="content_img2">
<ul class="gallery_demo_unstyled gallery_demo galleria1">
<li class=""><img rel="img/lasvegas.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/lasvegas.gif" alt="Vegas" title="Vegas"></li>
<li class=""><img rel="img/wildwoods.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/wildwoods.gif" alt="Wildwoods" title="Wildwoods"></li>
</ul>
</div>
<div id="content_img2">
<ul class="gallery_demo_unstyled gallery_demo galleria1">
<li class=""><img rel="img/nyc.gif" class="thumb selected" style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/nyc.gif" alt="NYC" title="NYC"></li>
</ul>
</div>
</div>
</body>
I then tried to add the code to show the thumbnail images as popup if user hovers over the image with functionality 1 and 2 intact. But it was not working with current style/JS.
To show how I want the popup, I added a the following code after <div id="content_img2">
<a class="thumbnail" href="#thumb"><img style="width: 91px; height: 80px; margin-left: 0px; opacity: 0.3;" src="js/travelogy/dc.gif" alt="DC" title="DC"><span><img src="js/travelogy/dc.gif" /><br />Simply beautiful.</span></a>
The complete sample code is attached as .zip file. I would appreciate if someone can help me with this as I am totally struck and have no clue how to resolve this. Thanks in Advance!!