This code works on ie7, but it does not work on firefox. it just shows a alert when focus occur on an element. you can just click something on the page and you will see alert at ie7.
var _focusedElement; $(document).ready(function() { $("*").bind("focus", function(e) { alert(this.id); _focuedElement = this; }).bind ("blur", function(e) { _focuedElement = null; }); });