window.currFocus document (window). on( focusin, function () console.logIm working on a jQuery mobile site where I want the screen to scroll to inputs as a user clicks on them. The code below works great on a desktop but, as soon as I switch to a mobile fn:focusinjQuery : ("p").focusin(function() (.
this).find("span").css(display,inline).fadeOut(1000) Description If focusout blur handlers are attached on one input and focusin focus on the second one, the order of events fired by jQuery is The focusin event is sent to an element when it, or any element inside of it, gains focus. This is distinct from the focus event in that it supports detecting the focus event on parent elements (in other words, it supports event bubbling). (input[type"range"]).on("focusin", function() console.log(in) ).on("focusout", function() console.log(out) ) Update: Also tested on Mac OS X 10.9jQuery position() not working properly in Safari and Opera.