javascript - Resize event does not fire in Firefox, but I need to handle focus when FancyBox is shown -


I am working on a solution where the first input field should be selected when a fencebox is shown. I have tried to respond to the resize event, which is not well in Firefox but works in Firefox. Tried to respond to the click event on the link which opened the box - but obviously it is very fast, so some other elements are focusing later on. Any ideas ??

Use complete callback:

  $ ("# as well"). Fancybox ({onComplete: function () {$ ('# someTextBox'). Focus ();}});  

Comments