0
我有一個文本框我想在顯示它之後移動焦點。問題是,在最初的show()
,它將在演出動畫期間獲得焦點,但它已經消失。這是怎麼回事?jQuery焦點()在第一次顯示後不工作()在IE中
它可以在FireFox中正常工作,但不能在IE8中正常工作。我有一個運行的例子在這裏:
而且,這裏是代碼:
<input id="Button1" type="button" value="button" /><br />
<div id="Div1" style="display:none">
<input id="Text1" type="text" />
</div>
<input id="Text2" type="text" />
$("#Text2").focus();
$("#Button1").click(function(){
$("#Div1").toggle("slow").find("input:text").focus();
});