0

I have made a gallery.php. The code is as follows:

<div id="galleryImage">    
    <ul>    
        <li>
            <a href= "gallery.php?imgName='artistvan'">
            <img src="thumbnail/artistvan.jpg" title="The artist van" alt="The artist van"/></a>
        </li>
        ....
        ....
    </ul>
</div>

I have kept 25 li tag for 25 images.

The thumnails are on the right hand side of the div tag. When a thumbnail is clicked, the related image appears. I am passing imgName as parameter. So, it retrieves the related image from MySQL.

My question is, when I click thumbnail, that thumbnail should change so it can be figure out which link has been clicked. At the moment when I click, it retrieves an image but then there is no difference between clicked image and unclicked images.

I've tried a lot with CSS and somewhat javascript but I couldn't figure out. I would appreciate for your help. Thanks a lot.

Dexture
  • 976
  • 1
  • 11
  • 29
Toie
  • 21
  • 4
  • How exactly do you want it to change? You need to be a bit more specific and also offer some examples of what you have tried. – Josh Powell Feb 11 '14 at 15:13
  • If you want this to remain on the same page, javascript (read AJAX) will be the way to go. You could accomplish this using a form and page load (pure PHP/HTML), but that would be a bit clunky in my opinion. – Michael Wheeler Feb 11 '14 at 15:15
  • In gallery.php page, I have made
    with 25
  • tags, in order to show 25 thumbnails. These thumbnailes are in between tag. What I want, when I click a thumbnail, that image should change to see the difference between clicked and not clicked thumbnails. If this is not understandable then I would again type the code and try to make it understandable. please let me know..
– Toie Feb 11 '14 at 15:25