Become a partner of Graphic Holdine, use the correct post!

Changing Background Empty Changing Background on Sat Apr 02, 2011 7:51 am
From Ego-one...

<div style="position:relative;">
<div id="elm" style="height:100px;width:100px;background: url(;position:absolute;top:0px;left:0px;opacity:0;"></div><!-- << THIS IS THE EGO-ONE ICON -->
<div id="elm2" style="height:100px;width:100px;background: url(;position:absolute;top:0px;left:0px;"></div><!-- << THIS IS THE GOOGLE ICON -->
$("#elm2").stop().animate({opacity:0,},"slow"); // fade out the google icon...
$("#elm").stop().animate({opacity:1,},"slow"); // fade in the ego icon...
}, function(){
$("#elm2").stop().animate({opacity:1,},"slow"); // fade in the google icon... since we've left the element
$("#elm").stop().animate({opacity:0,},"slow"); // fade out the ego icon... since we've left the element

Using Just CSS:
<div id="element"></div><!-- THE ELEMENT THAT WILL BE CHANGING BACKGROUNDS -->
#element      {background:  url(;width:100px;height:100px;} /* Set the BG to google icon */
#element:hover {background: url(;} /* Turn the BG to ego icon on hover */

bye Wink

Permissions in this forum:
You cannot reply to topics in this forum

Designed by Jaloxin, Coded by Gangstar15 © 2011 All rights reserved.

Create a forum | Computers and Internet | Computers | © PunBB | Free forum support | Contact | Report an abuse |