<style type="text/css"> /* Menu contextuel */ span.dock { text-decoration:underline; } a.systememenu{ position:relative; z-index:1; font-weight:bold; color : #FFCC00; text-decoration:none; } a.systememenu span.menucache{ display: none; text-decoration:none; } a.systememenu span.menuvisible{ display: block; position:absolute; top:2em; left:2em; width:10em; border:1px solid #000; background-color:#FFF; text-align: center; font-weight:none; padding:5px; color: black; z-index:2; text-decoration:none; } </style> <script> var Timeout; function menu(id){ if (document.getElementById(id).getAttribute("class" ) == "menucache" ){ document.getElementById(id).setAttribute("class","menuvisible" ); Timeout = setTimeout("menu('" + id +"')", 1500); } else{ document.getElementById(id).setAttribute("class","menucache" ); clearTimeout(Timeout); } return false; } </script> </html> <body> <a href="#" class="systememenu" oncontextmenu="return menu('test')"><span class="dock">Texte 1</span><span id="test" class="menucache">Texte 2</span></a> </body> </html> |