I have an anchor tag that, when clicked, reveals a login form. I'd like the first field in the form to have focus when its revealed, and I can see that it does as it's being revealed in the slide animation but then focus is lost after return false;
any ideas? Here is my code.... I'm new to jQuery, so any help is appreciated $(function() { $("#login a").click(function() { $("#login").animate( { width: 300, height: 20 }, 500); $("#login a").hide("slide", null, 500, loginCallback); return false; }); }); function loginCallback() { $("#login_form").show("slide", null, 1000); $("input.focus").focus(); } Thanks, Stu