Results 1 to 3 of 3

Thread: image swap

  1. #1
    Join Date
    Oct 2008
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default image swap

    Hi all,

    I have seen a website online and i would like to so a similar site for a portfolio.

    It uses javascript so that when i user clicks on the thumbnail image it shows a large picture and text bellow. How does it work?

    here is the site:-

    http://www.electrickeries.com/

    thank you

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

  3. #3
    Join Date
    Dec 2008
    Location
    Nigeria
    Posts
    95
    Thanks
    3
    Thanked 8 Times in 8 Posts

    Default

    It is just toggling of HTML codes really, whether with ajax or without depending on the amount of photos involved.

    <table id="large" style="display:none">
    <tr><td><img src="large"></td></tr>
    <tr><td>My Photo</td></tr>
    </table>

    <img src="thumb" onclick="this.style.display='none';large.style.display='block';">

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
  •