I just don’t get it, why this way of .focus callback is not working?
$('a.focus').click(function(){
$('form input:first').focus(function(){
console.log('done focus');
});
});
Live demo: http://jsfiddle.net/SHxbj/
anything that I am doing wrong here?
Why not just do it this way:
The first chunk binds the click on the link to focus the cursor in the input field and the second chunk binds the focus event on the input field and sends the message to the console.
jsFiddle example.