使用jQuery动态生成的SELECT需要双击才能在IE8中打开

使用jQuery动态生成的SELECT需要双击才能在IE8中打开,jquery,html,cross-browser,Jquery,Html,Cross Browser,所有动态生成的选择框都有此问题,如果我单击一次,它会闪烁,如果我按住“单击”,它会打开,您可以浏览列表,但无法进行任何选择,只有我双击,您才能看到列表并实际选择一个元素 该选项位于select中,单击时会被钩住转到另一个页面,但我在站点的不同区域生成了两个简单的取消钩住的选项,结果是相同的 有什么想法吗 jQ('.slider-brands span.small-txt').addClass('cselect').append('<select><option>Chois

所有动态生成的选择框都有此问题,如果我单击一次,它会闪烁,如果我按住“单击”,它会打开,您可以浏览列表,但无法进行任何选择,只有我双击,您才能看到列表并实际选择一个元素

该选项位于select中,单击时会被钩住转到另一个页面,但我在站点的不同区域生成了两个简单的取消钩住的选项,结果是相同的

有什么想法吗

jQ('.slider-brands span.small-txt').addClass('cselect').append('<select><option>Choisir une marque</option></select>')
            //Populate the select with all the brands from the list
            for (var i = 0; i < brandsName.length; i++) {
                jQ('.slider-brands .cselect select').append('<option value="' + brandsLink[i] + '">' + brandsName[i] + '</option>')
            }
            //Go to location on click
            jQ('.slider-brands .cselect select').bind('change', function () {
                var url = jQ(this).val(); // get selected value
                if (url) { // require a URL
                    window.location = url; // redirect
                }
                return false;
            });
jQ('.slider brands span.small txt').addClass('cselect').append('Choisir une marque'))
//使用列表中的所有品牌填充select
对于(变量i=0;i
这个输出这个

<select>
  <option>Choisir une marque</option>
  <option value="/alsa">Alsa</option>
  <option value="/axe">Axe</option>
  <option value="/belin">Belin</option>
  <option value="/belvita-petit-dejeuner">belVita Petit Déjeuner</option>
</select>

侯爵酒店
阿尔萨
斧头
贝林
贝维塔小德青年酒店

我的想法是希望单击,而不是像stackoverflow上的另一个问题那样双击:)这听起来像是在同一页面中添加了多个jQuery版本,以及您正在使用的jQuery和IE8版本。最好是一个JSFIDLE。问题不在于它是如何生成的,我正在生成两个选择,一个更复杂,这个,另一个简单,行为是一样的,代码是一样的,在其他任何地方都有效。傲慢在这里是不受欢迎的。如果你不想别人向你求助,那就不要来这里寻求帮助。