IE6:在jQuery选项卡中选择不会呈现下拉列表 [英] IE6: select inside jQuery tabs does not render dropdown list

查看:120
本文介绍了IE6:在jQuery选项卡中选择不会呈现下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在jQuery选项卡中有一个表单;我以一种简单的方式创建标签:

I have a form inside jQuery tabs; I create tabs in a simple way:

$("#tabs").tabs({selected: 1});

所选索引1是放置表单的选项卡.问题是,在使用IE6的远程计算机上,当单击下拉箭头时,这两个选项都只显示一个小的空白行,而不显示带有选项的列表:

The selected index 1 is the tab where form is placed. The problem is, on remote computer with IE6 both selects only display a small blank line instead of list with options when dropdown arrow is clicked:

错误的下拉列表http://queen3.at.tut.by/DropDownIE6jQuery.PNG

页面源中提供了这些选项,并且所有内容实际上都可以在其他计算机,其他浏览器以及IE6(尽管我使用IETester)中运行.

The options are there in page source, and everything actually works on other machines, in other browsers and also in IE6 (though I use IETester).

如果我也一切正常

  • 删除选项卡的创建,即.tabs()-选项确实出现并起作用;或
  • 首先选择不带表格的标签(标签0),然后单击它-选项会显示并起作用
    • 仅在单击时;创建标签后编程的.tabs("select",1)无效
    • remove tabs creation, that is .tabs() - options do appear and work; or
    • first select tab without form (tab 0), and then click on it - options do appear and work
      • only when clicking; programmatic .tabs("select", 1) after tabs creation doesn't help

      有人知道是什么原因引起的吗?是IE6错误还是我的脚本出现了什么?

      Does anyone know what can cause this? Is it IE6 bug or something with my scripts?

      更新:嗯,多亏了,我发现它是CSS的某些功能-如果我禁用Site.css,则可以使用.我只考虑脚本.仍然必须找出那是什么.

      Update: hm, thanks to this, I found it's something with my CSS - if I disable Site.css it works. I thought about scripts only. Still have to find out what's that.

      更新:确定,这是由以下CSS规则引起的:

      Update: OK, this was caused by this CSS rule:

      body { font-size: 0.7em; }
      

      如果我设置为0.8或更高,它会起作用,但是如果0.7或更低,IE6会显示错误.

      It works if I set 0.8 or greater, but for 0.7 and less IE6 does the indicated bug.

      有人可以解释吗?是的,它是IE6-从定义上来说很奇怪,但是我认为这个太奇怪了.

      Can someone explain this? Yes it is IE6 - weird by definition, but this one is too weird in my opinion.

      推荐答案

      我发现此解决方法已在某些计算机上解决了该问题,但在其他计算机上没有解决此问题.

      I found that this workaround fixed the issue on some machines, but not on others.

      我的解决方案是在样式表中最初隐藏所有选择元素,然后在调用$( "#tabs" ).tabs()之后使用$('select').show()显示它们.

      My solution was to hide all the select elements initally in the style sheet, then after calling $( "#tabs" ).tabs() I use $('select').show() to display them.

      那为我解决了.

      这篇关于IE6:在jQuery选项卡中选择不会呈现下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆