Forum Moderators: phranque

Message Too Old, No Replies

Javascript for onmouseover

         

SorenG

5:09 pm on Nov 13, 2007 (gmt 0)

10+ Year Member



Hi everyone,

Is there anyone who can help me with where I can get this javascript?

I have seen it several places, but here's an example: [templatemonster.com....] When you hover your mouse over a thumbnail, a larger image opens up and closes onmouseout.

Cheers,
Soren

phranque

11:40 pm on Nov 13, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



if you look for something like "javascript rollover image" you will find plenty of scripts.
basically you need a function that will swap the value of the src attribute tag of a named img tag and in the onmouseover/out events you invoke the function and pass it the name of the img tag and the src value for the replacement image file.
if the files are large you may also want to preload the images during body onload so that there is no wait time for the HTTP GET during the initial (pre-cache) mouseover of each image.

jd01

3:26 am on Nov 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would also suggest looking / posting the the JavaScript Forum [webmasterworld.com].

You will probably get more answers and information than in here.

Justin

SorenG

3:54 am on Nov 14, 2007 (gmt 0)

10+ Year Member



Thanks very much, guys. I appreciate the help...

Soren