Advanced Search

Results 1 to 4 of 4

Thread: Image Tumbnail Viewer II - Making thumbs a link

  1. #1
    Join Date
    Oct 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Image Tumbnail Viewer II - Making thumbs a link

    1) Script Title: Image Thumbnail Viewer II

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...thumbnail2.htm

    3) Describe problem:

    Hello,

    I've put the Image Thumbnail Viewer II successfully on my site (still in development) and it works great. However, I REALLY need to make the thumbnails link to a page as opposed to the enlarged image. I don't need the enlarged image to link to anything. After searching for a while on the forums I've found out how to disable the click, but how do I make the thumb link to a page? This seems to be a surprisingly uncommon question.

    I also found a resolved method for the older version of the script...but not the current (may '10) script.

    Help would be GREATLY appreciated!

    Thanks,
    Casey

  2. #2
    Join Date
    Aug 2004
    Posts
    9,878
    Thanks
    3
    Thanked 956 Times in 945 Posts
    Blog Entries
    15

    Default

    By default the script assumes the path to the large image is defined as the href attribute value of the thumbnail link. In order to make the thumbnail a functional link, we need to modify the script so it relies on another attribute of the thumbnail to store the enlarged image path. The below modified script does this, by using the attribute "data-largeimage" instead. With it, the following is a sample thumbnail link markup:
    Code:
    <a href="http://cnn.com" data-largeimage="http://www.nasa.gov/images/content/167040main_image_feature_738_ys_4.jpg" rel="enlargeimage" rev="targetdiv:loadarea" title="The Universe is just waiting to be explored">Saturn #1</a>
    Attached Files Attached Files
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    textile (10-28-2010)

  4. #3
    Join Date
    Oct 2010
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile

    You sir are an angel, works perfectly! Thank you thank you thank you!
    Last edited by textile; 10-28-2010 at 05:56 PM.

  5. #4
    Join Date
    Oct 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    hi, thank you for this new property and this nice script, I was looking too !


    I used to test the previous version of the script, where an image was loaded by default in the #loadarea div. (dynloadarea was the name)
    I wondered how do the same with this jquery version ?
    and I found the simplest solution : just put img and legend in the loadarea div of the page, and the image changes when the cursor are over the thumbs !
    Last edited by effi; 10-31-2010 at 06:09 PM.

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
  •