I am working on a solution where I need to have the first input field selected when a fancybox is shown. I have tried reacting to the resize event, which works fine in IE but not in Firefox. Also tried reacting to the click event on the link that opens the box - but aparently this is too early so some other element steals focus afterwards. Any ideas??
views:
65answers:
1
+1
A:
use the onComplete callback:
$("#whatever").fancybox({
onComplete: function() {
$('#someTextBox').focus();
}
});
Andrew Bullock
2010-05-18 10:29:36