HighDots Forums  

Rollover effect : change border colours on images.

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Rollover effect : change border colours on images. in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
absorb webforumsuser@macromedia.com
 
Posts: n/a

Default Rollover effect : change border colours on images. - 10-01-2003 , 06:43 AM






Hi,

I've seen a number of site which when you rollover images the border changes colour. I quite like this effect and was wondering which is the best way to do it. Is it a case of CSS, or a javascript 'change background of cell'?

It's used on Moluv for example: http://www.moluv.com

any ideas?

many thanks

Michael



Reply With Quote
  #2  
Old   
dcleare webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Rollover effect : change border colours on images. - 10-01-2003 , 07:07 PM






In viewing the source code, it looks as though they used the 'on mouse over' script with
two different gifs.

Go into: View then source.

I hope this helps.

Deborah





Reply With Quote
  #3  
Old   
wescarmichael webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Rollover effect : change border colours on images. - 10-01-2003 , 07:26 PM



just following up what dclare says:
this is the function in the head of the document - do a search in notepad for "_4Singl" and this'll take you to the relevant table in further down the document to see how the function is called.


function OutlineToggle(ImageNumber,OnOff) {
//alert ("test");
//alert ( (eval("Block1_" + ImageNumber)).src );

redblock = new Image(125,2);
redblock.src = "/images/redblock.gif";

glassblock = new Image;
glassblock.src = "/images/glassblock.gif";

if ( OnOff == "on" ) {
document["Block1_" + ImageNumber].src = redblock.src
document["Block2_" + ImageNumber].src = redblock.src
document["Block3_" + ImageNumber].src = redblock.src
document["Block4_" + ImageNumber].src = redblock.src
} else {
document["Block1_" + ImageNumber].src = glassblock.src
document["Block2_" + ImageNumber].src = glassblock.src
document["Block3_" + ImageNumber].src = glassblock.src
document["Block4_" + ImageNumber].src = glassblock.src
}

}




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.