Helmut Giese wrote:
On Wed, 28 Jun 2006 11:54:46 +1000, Lachlan Hunt
<sp***********@gmail.com> wrote: What's the purpose of the rollover when JS is enabled? Is it just a
presentational enhancement or is the rollover image really meaningful
content? If it's just presentational, it doesn't matter if it's not
shown to some users and it's certainly not worth linking to separately.
No, it's the central part of the message. Something like
This is how things are now.
Move the mouse over the image to see
how it could be like. :)
So I would like to find a way to present it in a meaningful way even
if Javascript is disabled.
Best regards
Helmut Giese
You could try something like this:
<a href="more-info" class="before-after">
<img src="before.jpg" class="before" alt="...">
<img src="after.jpg" class="after" alt="...">
</a>
a.before-after img.after { position: absolute; left: -2000px; }
a.before-after:hover img.before,
a.before-after:focus img.before { position: absolute; left: -2000px; }
a.before-after:hover img.after,
a.before-after:focus img.after { position: static; }
You could use display: none; instead of positioning them off screen, but
then, unfortunately, broken screen readers wouldn't read the alt text.
That way, no javascript is required at all. It should work in IE and
users with CSS disabled still get both images.
--
Lachlan Hunt
http://lachy.id.au/ http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox