jquery菜单和IE

时间:2011-08-16 16:49:44

标签: jquery html css

我有这个菜单:

 <script type="text/javascript"> 
<!--//--><![CDATA[//><!--
$("html").addClass("js");
$.fn.accordion.defaults.container = false; 
$(function() {
  $("#acc3").accordion({initShow : "#current"});
  $("#acc1").accordion({
      el: ".h", 
      head: "h4, h5", 
      next: "div", 
      initShow : "div.outer:eq(1)"
  });
  $("#acc2").accordion({
      obj: "div", 
      wrapper: "div", 
      el: ".h", 
      head: "h4, h5", 
      next: "div", 
      showMethod: "slideFadeDown",
      hideMethod: "slideFadeUp",
      initShow : "div.shown"
    });
  $("html").removeClass("js");
});
//--><!]]>
</script> 
<!--<![endif]--> 

    <div id="menuesq_container">
<div id="main">
    <div class="marcadorMenuEsq">
    <h2 class="hMarcador">Produtos</h2></div> 
    <div id="acc2" class="accordion"> 
                        <h4>Panelas</h4> 
                        <div class="inner"> 
                            <h5>PanelaA</h5> 
                            <div class="inner"> 
                              <p>Panela1</p>
                              <p>Panela11</p>
                              <p>Panela12</p>
                              <p>Panela13</p>
                            </div> 
                            <h5>PanelaB</h5> 
                            <div class="inner"> 
                               <p>Panela2</p>
                               <p>Panela21</p>
                               <p>Panela22</p>
                               <p>Panela23</p>
                          </div> 
                               <p>Panela3</p>
                               <p>Panela31</p>
                               <p>Panela32</p>
                               <p>Panela33</p>
                          </div> 
                          <h4>Faca</h4> 
                          <div class="inner shown"> 
                              <h5>FacaA</h5> 
                              <div class="inner"> 
                                  <p>Faca1</p>
                                  <p>Faca12</p>
                                  <p>Faca13</p>
                              </div> 
                              <h5>FAcaB</h5> 
                              <div class="inner"> 
                                  <p>Faca2</p>
                                  <p>Faca22</p>
                                  <p>Faca23</p>
                              </div> 
                          </div> 
                          <h4>Frigideira</h4> 
                          <div class="inner"> 
                              <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> 
                <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> <p>Frigideira1</p>
                <p>Frigideira12</p>
                <p>Frigideira13</p>
                <p>Frigideira14</p>
                <p>Frigideira15</p>
                <p>Frigideira16</p> 
                          </div> 
                    </div> <!-- end Accordion 2 --> 
                </div> 
            </div>
    </div></div>

它适用于Chrome,FF,Safari和IE9。问题是IE6,IE7和IE8的导航被隐藏了。我正在测试IE6,当我删除I​​nternet临时文件时,菜单神奇地出现而不刷新页面。

This is the JQ accordion that I use

this is the Test Site Link

2 个答案:

答案 0 :(得分:0)

错误似乎发生在IE quirksmode中(IE 7-9标准模式确实显示菜单)

Chrome和IE都出错:Autocomplete is not defined

我认为问题不是手风琴,请尝试删除/修复以下内容以查看手风琴是否适用于IE6 +

new Autocomplete('query', { 
    serviceUrl:'BuscaTermosProd.asp?IDLoja=12929',
    minChars:2,
    maxHeight:300,
    width:370,
    deferRequestBy:500,
    showResults:1,
    autoSubmit:false,
   onSelect: function(value, data){
     document.buscaprod.Texto.value=value;
     document.buscaprod.submit();
   }
});

答案 1 :(得分:0)

问题在于这个css风格:

.js #main .accordion {visibility:hidden}

我只删除了这个并且一切正常。