Alfred Molon wrote:
> Ok, many thanks for the script. I did it, here is an example:
> http://www.molon.de/galleries/German.../img.php?pic=5
>
> Left/right arrows to go back and forth, up arrow to return to the photo
> gallery. What do you think?
Looks good! Now a couple of things. You do realize that it will not work
at all with IE6 because IE6 does not recognize the hover pseudo-element
"hover" on anything other than an A element with an HREF attribute. You
will need some JavaScript or the htc hack:
<public:component>
// For MSIE use JScript to attach JS functions to compensate
// for missing pseudo-class support
// from Vladdy
http://www.vladdy.net/Demos/IEPseudoClassesFix.html
// updated for html4.01 jnl 3/06
// added focus|blur jnl 5/07
<public:component>
// For MSIE use JScript to attach JS functions to compensate
// for missing pseudo-class support
// from Vladdy
http://www.vladdy.net/Demos/IEPseudoClassesFix.html
// updated for html4.01 jnl 3/06
// added focus|blur jnl 5/07
<public:attach event="onmouseover" onevent="DoHover()">
<public:attach event="onmouseout" onevent="RestoreHover()">
<public:attach event="onmousedown" onevent="DoActive()">
<public:attach event="onmouseup" onevent="RestoreActive()">
<public:attach event="onfocus" onevent="DoFocus()">
<public:attach event="onblur" onevent="RestoreFocus()">
<script type="text/jscript">
function DoHover(){
element.className += ' hover';
}
function DoActive(){
element.className += ' active';
}
function DoFocus(){
element.className += ' focus';
}
function RestoreHover(){
element.className = element.className.replace(/\shover\b/,'');
}
function RestoreActive(){
element.className = element.className.replace(/\sactive\b/,'');
}
function RestoreFocus(){
element.className = element.className.replace(/\sfocus\b/,'');
}
</script>
</public:component>
And the second thing is you don't need the demo() JavaScript function.
That was just to give you the alert box in the demonstration page to
show you what the clinks did.
I may use the concept for my site where I if the user has JavaScript
enabled I will stack several images of a piece and then use the links
just to rotate among them and not traverse to another page. Of course if
they don't have JavaScript enabled the images would just be laid out in
a column...
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com