|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
LakjaSupay Smarty n00b
Joined: 19 Aug 2008 Posts: 4
|
Posted: Tue Aug 19, 2008 2:54 pm Post subject: Rolldown menu no funca en IE |
|
|
Hola, estoy armando un menu de tipo rolldown, funciona bien en FF, pero no en IE, lo raro es q si saco el codigo del menu fuera del archivo index.tpl y lo pego en index.php, IE si reconoce el codigo y funciona bien
este es mi codigo:
index.php
session_start();
include_once("config.cemla.php");
$smarty->display("index.tpl");
index.tpl
<html>
<head>
<link rel='StyleSheet' type='text/css' href='standard.css' />
{php}
global $xajax;
{/php}
<script src="classes/js/topMenuNav.js" type="text/javascript"></script>
</head>
<body onload="xajax_loadIndexModules();">
<ul id="topMenuMainNav">
<li><a href="#">Percoidei</a>
<ul>
<li><a href="#">Remoras</a></li>
<li><a href="#">Tilefishes</a></li>
<li><a href="#">Bluefishes</a></li>
<li><a href="#">Tigerfishes</a></li>
</ul>
</li>
<li><a href="#">Anabantoidei</a>
<ul>
<li><a href="#">Climbing perches</a></li>
<li><a href="#">Labyrinthfishes</a></li>
<li><a href="#">Kissing gouramis</a></li>
<li><a href="#">Pike-heads</a></li>
<li><a href="#">Giant gouramis</a></li>
</ul>
</li>
</ul>
</body>
</html>
standard.css
#topMenuMainNav, #topMenuMainNav ul{
padding: 0;
margin: 0;
list-style: none;
}
#topMenuMainNav a{
display: block;
width: 9em;
}
#topMenuMainNav li{
float: left;
clear:none;
width: 9em;
}
#topMenuMainNav li ul {
position: absolute;
width: 9em;
left: -99em;
}
#topMenuMainNav li:hover ul, #topMenuMainNav li.sfhover ul {
left: auto;
}
topMenuNav.js
sfHover = function() {
var sfEls = document.getElementById("topMenuMainNav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
Puede alguien indicarme donde esta mi error?, o is es un bug de IE, como solucionarlo?
grax
Last edited by LakjaSupay on Tue Aug 19, 2008 3:19 pm; edited 1 time in total |
|
Back to top |
|
Spielberg Smarty Rookie
Joined: 20 Apr 2007 Posts: 6 Location: Spain
|
Posted: Fri Aug 29, 2008 4:07 pm Post subject: Este menu me suena |
|
|
Esa función de javascript es para que los explorer inferiores al 6 hagan "caso" de la subclase :hover, ya que sólo hace caso cuando se trata de enlaces. Me parece que esa no es la última versión, hay otra nueva en la web que va mejor, de todas maneras, prueba a copiar el codigo directamente en la tpl y sino indica que error te da.
Javi
--------------
www.inmonet.net |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|