Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Image preview on hover
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
iMatto  
View profile  
 More options Jul 17 2007, 5:52 pm
From: iMatto <mat...@essentialebizsolutions.net>
Date: Tue, 17 Jul 2007 14:52:06 -0700
Local: Tues, Jul 17 2007 5:52 pm
Subject: Image preview on hover
Is it possible to use this to set a way that when a user hover's over
an image i.e. a thumbnail, a larger version of the image is
revealed???

Many thanks


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
webEater  
View profile  
 More options Jul 29 2007, 11:51 am
From: webEater <andreaskal...@gmx.de>
Date: Sun, 29 Jul 2007 08:51:52 -0700
Local: Sun, Jul 29 2007 11:51 am
Subject: Re: Image preview on hover

On 17 Jul., 23:52, iMatto <mat...@essentialebizsolutions.net> wrote:

> Is it possible to use this to set a way that when a user hover's over
> an image i.e. a thumbnail, a larger version of the image is
> revealed???

> Many thanks

Should be no problem, example:

// MyThumb is an Image
$(MyThumb).addListener('mouseover', function(e) {
  // create new Image and set source
  var I;
  if (!this._I) {
    I = this._I = $(new Image());
    I.src = 'pathToBiggerImage.jpg';

    // listener for hiding the bigger Image on mouseout
    I.addListener('mouseout', function(e) {
      this.hide(); // simple, no animation ..
    });
  }
  else
    I = this._I;

  // get Position of thumb
  var p = Position.page(this);

  // set position
  I.style.position = 'absolute';
  I.stye.left = p[0]+'px';
  I.stye.top = p[1]+'px';

  // I haven't tested this, so try it ;)

  // U se run to show it smoothly
  new Run({
    elements: I,
    time: 0.5,
    flow: Run.SMOOTH,
    style: {
      opacity: [0, 1],
      width: [this.offsetWidth+'px', null],
      height: [this.offsetHeight+'px', null]
    }
  });

});

addListener is a method that simplifiers event handling. It is based
on prototype's Event.observe and is part of prototype_extended.js.

Give me feedback if my example works. I surely forgot something ;)

Andi


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google