|
-
Aug 3rd, 2004, 10:03 AM
#1
Thread Starter
PowerPoster
Mousover Effect For My Links
Does anyone remember the website that has an easy Javascript code to produce menu flyouts when you mouseover a link?
Thanks
-
Aug 3rd, 2004, 10:10 AM
#2
Frenzied Member
You can't just use CSS? And what do you mean by fly-outs?
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Aug 3rd, 2004, 10:18 AM
#3
Frenzied Member
Have a look at this article:
http://alistapart.com/articles/dropdowns
nice valid non-javascript (well a bit, to fix an IE glitch) 'menu-flyouts'
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Aug 3rd, 2004, 10:23 AM
#4
Frenzied Member
The example is *****ed in Gecko
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Aug 4th, 2004, 08:16 AM
#5
Thread Starter
PowerPoster
thanks for your responses but what I am looking for is a simple way to show a thumbnail image whenever you mouseover a link. Not replace the link what pop a thumbnail image to the right of the link.
-
Aug 4th, 2004, 09:09 AM
#6
Frenzied Member
:::`DISCLAIMER`:::
Do NOT take anything i have posted to be truthful in any way, shape or form.
Thank You!
--------------------------------
"Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
"Finaly I can look as gay as I want..." - NoteMe
Languages: VB6, BASIC, Java, C#. C++
-
Aug 4th, 2004, 09:14 AM
#7
Thread Starter
PowerPoster
DUH! I tried that already
-
Aug 4th, 2004, 09:33 AM
#8
This (sorta) works in ie... No idea on the other browsers and its probably bad code. Hey you could tweak it though?
Code:
<html>
<head>
<script type='text/javascript'>
function doSwap(t,o,u,x,y) {
if (t==1) {
o.innerHTML = "<img src='"+u+"' width="+x+" height="+y+" />";
}else{
o.innerHTML = u;
}
return true;
}
</script>
</head>
<body>
Stuff n nonsense
<a href='#' title='A link' onMouseOver='doSwap(1,this,"./pic",128,32);' onMouseOut='doSwap(2,this,"A link to no-where",0,0);'> A link to no-where </a>
</body>
</html>
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Aug 4th, 2004, 02:52 PM
#9
-
Aug 6th, 2004, 01:13 AM
#10
Frenzied Member
Originally posted by jesus4u
thanks for your responses but what I am looking for is a simple way to show a thumbnail image whenever you mouseover a link. Not replace the link what pop a thumbnail image to the right of the link.
it's rather easy actually, I have to go to school now, but I'll fix something up for you when I get home, tip(a DIV is a very good friend)
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Aug 6th, 2004, 06:30 AM
#11
Frenzied Member
I've fixed a little example for you.
It has 2 states, off and on (duh!). It's all done with a few lines of css.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Mouseover</title>
<style type="text/css" media="screen">
a.button{
display: block;
width: 200px;
height: 50px;
background: url(off.gif);
}
a.button:hover{
background: url(on.gif);
}
</style>
</head>
<body>
<a href="#" class="button"></a>
</body>
</html>
you can see an working example at:
http://validweb.nl/vbforums/mouseover/
Hope this gets you on the right track.
edit: If you need more than one button (obviously), you should make use of unique id's:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Mouseover</title>
<style type="text/css" media="screen">
a.button{
display: block;
width: 200px;
height: 50px;
}
a.button#b1{ background: url(off.gif); }
a.button#b1:hover{ background: url(on.gif); }
a.button#b2{ background: url(off2.gif); }
a.button#b2:hover{ background: url(on2.gif); }
</style>
</head>
<body>
<a href="#" class="button" id="b1"></a><br />
<a href="#" class="button" id="b2"></a>
</body>
</html>
Working example:
http://validweb.nl/vbforums/mouseover/morebuttons.html
Good luck!
Last edited by Jop; Aug 6th, 2004 at 06:36 AM.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|