Advanced Search

Results 1 to 4 of 4

Thread: Image Thumbnail Viewer II Mouseout

  1. #1
    Join Date
    Jun 2010
    Posts
    58
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Default Image Thumbnail Viewer II Mouseout

    1) Script Title: Image Thumbnail Viewer II

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

    3) Describe problem:

    I would like to add a mouseout function so that when the mouse leaves the thumbnail, the image disappears. I would only like the zoomed version to appear when the mouse is hovering. Thanks!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,681
    Thanks
    43
    Thanked 3,127 Times in 3,093 Posts
    Blog Entries
    12

    Default

    Put this script in the head of the page after the scripts for the Thumbnail Viewer:

    Code:
    <script type="text/javascript">
    jQuery(function($){
    	var re = /targetdiv\s*:([^,]+)/;
    	$('a[rel=enlargeimage]').mouseleave(function(){
    		var la = '#' + $.trim(re.exec(this.getAttribute('rev'))[1]);
    		$(la).empty().data('$curanchor', '');
    	});
    });
    </script>
    - John
    ________________________

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

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

    katebellami (06-01-2012)

  4. #3
    Join Date
    Jun 2010
    Posts
    58
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Default

    Thanks! It seems to be a bit quirky. It doesnt swap each time when I mouseover. I also have another doozy puzzle. Trying to combine this script with the switch content script so that when you actually click each 'thumbnail' (rather than mouseover, which just switches the image) the description shows up below. Here is the link to the page..any help would be soo appreciated.
    http://www.be-eventproductions.com/t...urservice.html
    I suspect that the href in the thumbnail script is interfering with the span id in the switchgroup.
    Thanks again!!

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,681
    Thanks
    43
    Thanked 3,127 Times in 3,093 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by jscheuer1 View Post
    Put this script in the head of the page after the scripts for the Thumbnail Viewer:

    Code:
    <script type="text/javascript">
    jQuery(function($){
    	var re = /targetdiv\s*:([^,]+)/;
    	$('a[rel=enlargeimage]').mouseleave(function(){
    		var la = '#' + $.trim(re.exec(this.getAttribute('rev'))[1]);
    		$(la).empty().data('$curanchor', '');
    	});
    });
    </script>
    You put it before. I just tried in a mock up, same problem until I moved it after, then it was fine.
    - John
    ________________________

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

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
  •