Results 1 to 2 of 2

Thread: add Facebox to Image Thumbnail Viewer II script

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

    Default add Facebox to Image Thumbnail Viewer II script

    1) Script Title: Thumbnail Viewer II script

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...thumbnail2.htm

    3) Describe problem:

    I would like to add the Facebox function to the Thumbnail Viewer II script, so when you click on the larger picture it opens using the Facebox script
    http://www.dynamicdrive.com/dynamici...ebox/index.htm

    I tried altering the js fole for the thumbnail image viewer II with this line

    if (typeof dest!="undefined") //Hyperlink the enlarged image?
    imageHTML='<a href="'+dest+'" rel="facebox">'+imageHTML+'</a>'

    however it still does not work.

    thanks
    john

  2. #2
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I was able to fix this by also altering this block of code in the thumbnailviewer2.js file

    Code:
    pagelinks[i]["on"+initType]=function(){ //Load enlarged image based on the specified display type (event)
    thumbnailviewer2.loadimage(this) //Load image
    //add this from facebox script
       jQuery(document).ready(function($) {
          $('a[rel*=facebox]').facebox() 
        })
    return false
    }

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
  •