Re: mouseovers
by "Phil Babcock" <pbabcock(at)bgsgroup.com>
|
| Date: |
Thu, 30 Nov 2000 16:22:51 -0500 |
| To: |
"Tamara Abbey" <tamara(at)abbeyink.com>, shawn(at)sportsstuff.com, "html list" <hwg-basics(at)mail.hwg.org> |
| References: |
abbeyink |
| |
todo: View
Thread,
Original
|
|
*********** REPLY SEPARATOR ***********
On 11/30/2000 at 12:10 PM Tamara Abbey wrote:
>Shawn,
>
>Best darn mouseover script on earth (IMO) http://www.xs4all.nl/~ppk/js/
>then scroll the left-hand navigation.
*********** REPLY SEPARATOR ***********
I see alot of different mouseover image rollovers that seem unnecessarily=
complicated, at least to me, and this is one of them. Why go through all=
that creating and calling of functions and arrays? This is what I use:
<script language=3D"JavaScript">
//preload the images - the var names (ie image1, image2 etc) are irrelevant=
, all this needs to do is load the images into clients memory
//the var names will not be used again
image1 =3D new Image();
image1.src =3D "12on.gif";
image2 =3D new Image();
image2.src =3D "13on.gif";
image3 =3D new Image();
image3.src =3D "14on.gif";
//etc etc for as many as you need
//this script isnt even necessary, but just speeds up the rollover effect a=
bit
//if your images were really small and connection fast, you could probably
//do without this script
</script>
Now in my html:
<a href=3D"wherever.html" onmouseover=3D"12.src=3D'12on.gif'; return true"=
onmouseout=3D"12.src=3D'12off.gif'; return true"><img src=3D"12off.gif"=
name=3D"12"></a>
Maybe I am missing something, but I really don't see why scripts like the=
one on PPK's excellent site are necessary... can anyone explain what a=
script like that has over doing it inline like I have done above?
puzzled,
phil.
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.