Results 1 to 4 of 4

Thread: Image Thumnail Viewer II

  1. #1
    Join Date
    Aug 2008
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Image Thumnail Viewer II

    1) Script Title: Image Thumbnail Viewer II

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

    3) Describe problem:

    I have been able to set up and use this script. But is it possible to disable the click option on this? I do not want the users to be able to click and have it open the jpg in a window. I just want them to mouseover the image. I tried using trigger:mouseover but the click is still enabled.

    Thank you.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try adding onclick="return false;" to the link
    Jeremy | jfein.net

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Better to make them all click disabled without having to edit each one. Add this highlighted code to the very top of the thumbnailviewer2.js script:

    Code:
    jQuery(function($){
    	$('a[rel=enlargeimage]').click(function(e){
    		e.preventDefault();
    	});
    });
    
    /*Image Thumbnail Viewer II (May 19th, 2010)
    * This notice must stay intact for usage 
    * Author: Dynamic Drive at http://www.dynamicdrive.com/
    * Visit http://www.dynamicdrive.com/ for full source code
    */
    
    //Last updated: Sept 26th, 2010: http://www.dynamicdrive.com/forums/showthread.php?t=57892
    
    jQuery.noConflict()
    
    jQuery.thumbnailviewer2={
    		loadmsg: '<img src="spinningred.gif" /><br />Loading Large Image...', //HTML for loading message. Make sure image paths are correct
    
    	/////NO NEED TO EDIT BEYOND HERE////////////////
    
    	dsetting: {trigger:'mouseover', preload:'yes', fx:'fade', fxduration:500, enabletitle:'yes'}, //default settings
    	buildimage:function($, $anchor, setting){
    		var imghtml='<img src="'+$anchor.attr('hr . . .
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    akmporter (01-08-2011)

  5. #4
    Join Date
    Aug 2008
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thank you for the responses! The second suggestion worked just perfectly. Thank you.

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
  •