开发者

jquery select() problem in IE(8)

开发者 https://www.devze.com 2022-12-13 04:31 出处:网络
jquery\'s select() is no开发者_运维问答t working in IE, but its working fine in Firefox and Chrome.

jquery's select() is no开发者_运维问答t working in IE, but its working fine in Firefox and Chrome.

What may be the problem with select() in IE, particulary IE8?


IDEA 1

Try adding a click trigger to your checkbox:

$(selector_to_checkbox).click(function(){ $(this).change() });

It is possible IE isn't properly triggering the change event.

IDEA 2

Try explicitly blurring the checkbox before calling .select

$(selector_to_checkbox).change(function(){
    $(this).blur();
    $(selector_to_textbox).select();
});
0

精彩评论

暂无评论...
验证码 换一张
取 消