I have is a hidden div. When the button is clicked, the div slides down with an input field. How do I make this input field autofocus as soon as the div slides down? Thanks.
<input type="text" name="comment_field" id="comment_field" placeholder="Comment..." />
is what I have and is in a div
$("#status_comments_"+a).slideDown();
$("#comment_field").focus();
I tried to use the above, but that didn't work.