Results 1 to 11 of 11

Thread: Mousover Effect For My Links

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Question 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

  2. #2
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    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.

  3. #3
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    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.

  4. #4
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    Originally posted by Jop
    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'
    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.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    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.

  6. #6
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152
    :::`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++

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    Originally posted by ice_531
    www.google.com

    DUH! I tried that already

  8. #8
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    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

    BOFH Now, BOFH Past, Information on duplicates

    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...

  9. #9
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152
    if its for a menu...make the menu in photoshop err do the main background in photoshop cs and then import it to imageready cs and create the menu and layers for the mouseover effects.

    if not....did you try the Jscript sites? ( ones with tons of apps and links to java games....i remember seeing link functions ) if i remember the url illpost it
    :::`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++

  10. #10
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    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.

  11. #11
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    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
  •  



Click Here to Expand Forum to Full Width