Posts Tagged ‘focus’

Focus element in ThickBox March 24, 2009 No Comments

I faced with a problem focusing element in thickbox popup. I open login form using thickbox and want to take a focus on the first element of the form. Though the following code does look to be working:

$(document).ready(function() {
    $("input[name='username']").focus();
});

But there is a little trick. If you make a small 100ms delay in focus() [...]