IE6: select inside jQuery tabs does not render dropdown list

百般思念 提交于 2019-12-05 18:01:29

I have also ran into this exact problem, although I couldn't fix it by altering any body font sizes, I did manage to get around it using the (slightly modified) "Ugly hack" method as described in the dev.jqueryui.com/ticket/4734 link, posted by CiscoIPPhone:

// Ugly hack to switch tabs in IE6, fixing select menu bug.
  if($.browser.msie && $.browser.version.substr(0, 1) <= 6) {
    $("#tabs").tabs({ selected: 1 }); 
    setTimeout(function() {
       $("#tabs").tabs("select", 0);
    }, 10);
  }

Seems as though the timeout is the key to avoiding this bug.

Duncan Bradley

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

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.

That fixed it for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!