So hab da mal bissl gebastelt. Also der Effect ist erstmal fürn Arsch
PHP-Code:
function showandhide(myid,big)
{
if(document.getElementById("sub_community").style.display =="none")
{
if(myid=="sub_community")
{
document.getElementById("sub_community").style.display = "block";
document.getElementById("main_community").className= "main_menu main_active"+(big?' big_menu':'');
/* TEST
$j("#sub_community").hover(function(){
$j("#hover").offset({left:50});
}, function() {
$j("#hover").offset({left:0});
});
*/
}
}
else
{
if(myid!="sub_community")
{
document.getElementById("sub_community").style.display = "none";
document.getElementById("main_community").className= "main_menu"+(big?' big_size':'');
}
}
}
PHP-Code:
<div id="hover"></div> <!-- DIV mit dem Hover Bild-->
<div id="main_community" onmouseover="showandhide('sub_community',true)" onmouseout="showandhide('sub_'+menustart,true)" class="main_menu big_size main_active big_menu"><a class="main_text" href="">Community</a></div>
Leider richtet sich der offset nach dem Bildschirmrand, den so wie es jetzt im Code ist, rutscht das bild außerhelb der Webseite.
Hab so auch mal im Netz geschaut, irgendwie hat keiner sowas
