http://byby.99k.org/easytrack/
efekti u meniju bi trebalo da funkcionisu tako da ''aktivan link'' ne menja boju pri rolloveru i rolloutu, a ostali "linkovi" da malo potamne (rollover), odnosno da se vrate na svetliju nijansu ako nisu ''aktivni''(rollout).
Skriptic je naravno vrlo jednostavan, pozivam funkcijicu na onmouseover i onmouseout, ali, u Operi i Chrome-u, ovo ne radi. Pomislio sam da su u pitanju putanje (imgPath u Chromu daje apsolutnu putanju), i probao sam nesto da resim, ali nije islo.
Code:
function hover(id){
var imgPath = new String();
absolute_path=document.location;
imgPath = document.getElementById(id).style.backgroundImage;
if(imgPath != "url(active_button.png)")
{
document.getElementById(id).style.backgroundImage="url(menu_bg_red_over.png)";
}
else
{
document.getElementById(id).style.backgroundImage = "url(active_button.png)";
}
}
function hover_out(id){
var imgPath = new String();
imgPath = document.getElementById(id).style.backgroundImage;
if(imgPath != "url(active_button.png)")
{
document.getElementById(id).style.backgroundImage="url(menu_bg_red.png)";
}
else
{
document.getElementById(id).style.backgroundImage = "url(active_button.png)";
}
function hover(id){
var imgPath = new String();
absolute_path=document.location;
imgPath = document.getElementById(id).style.backgroundImage;
if(imgPath != "url(active_button.png)")
{
document.getElementById(id).style.backgroundImage="url(menu_bg_red_over.png)";
}
else
{
document.getElementById(id).style.backgroundImage = "url(active_button.png)";
}
}
function hover_out(id){
var imgPath = new String();
imgPath = document.getElementById(id).style.backgroundImage;
if(imgPath != "url(active_button.png)")
{
document.getElementById(id).style.backgroundImage="url(menu_bg_red.png)";
}
else
{
document.getElementById(id).style.backgroundImage = "url(active_button.png)";
}
Unapred hvala na pomoci!
[Ovu poruku je menjao kelja dana 17.01.2010. u 21:06 GMT+1]