Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery focus not working in IE
    primarykey
    data
    text
    <p>I know others have run into this problem before. I have searched and tried all sorts of different solutions (including <a href="https://stackoverflow.com/questions/334489/jquery-focus">JQuery focus</a> and <a href="https://stackoverflow.com/questions/6485006/jquery-problem-focus-not-working">JQuery Problem .... Focus not working </a> and <a href="https://stackoverflow.com/questions/7996577/jquery-focus-is-not-focusing-in-ie-but-it-is-in-chrome">JQuery focus() is not focusing in IE but it is in Chrome</a>) yet nothing has worked.</p> <p>When the code runs in FF and Chrome, focus follows along as it should. However, in IE (I'm using IE9), no such luck. The focus is not placed on the input text. Any assistance would be appreciated.</p> <pre><code>// textInputArray contains the input field along with some other html with instructions // about the input field $("input.answerBox").live("keypress", function(event) { if ((event.which == 13) &amp;&amp; (i &lt; textInputArrayLength)){ $("div.textInput").html(textInputArray[i]) .fadeIn(200); $("input.focus:last").focus(); i++; } } </code></pre> <p>Again, everything works as expected in FF and Chrome, but not IE. The contents of the textInput div is replaced, but the input text box does not receive focus in IE.</p> <p>Edit: html as requested</p> <pre><code>&lt;div id="menuBar"&gt; &lt;ul class="dropdown"&gt; &lt;li class="menuLi"&gt;&lt;a href="#" class="blank"&gt;Item 1&lt;/a&gt; &lt;ul class="sub_menu"&gt; &lt;li class="menuLi"&gt;&lt;a href="#" class="blank"&gt;Number&lt;/a&gt; &lt;ul class="sub_sub_menu"&gt; &lt;li class="menuLi"&gt;&lt;a href="/test/index.php" class="menuItem blank"&gt;Sub Item 1&lt;/a&gt;&lt;/li&gt; &lt;li class="menuLi"&gt;&lt;a href="/test/index.php" class="menuItem blank"&gt;Sub Item 2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/ul&gt; &lt;/ul&gt; &lt;br&gt; &lt;/div&gt; &lt;div id="main"&gt; &lt;h1 class="header1"&gt;Quick Quiz&lt;/h1&gt; &lt;div class="textInput"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="footer"&gt;&lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload