Jquery Show/Hide on mouse

This is a simple function that hides an item when the mouse leaves. The object can be visible initially and will only dissapear once the mouse has entered AND left. $(‘div.mouse.LeaveHide’).on({ mouseover:function(e){ $(e.target).one({ mouseleave:function(e){ $(e.target).hide(); } }); } });

Find an IFrames id

There is an HTML5 (originally IE extension) property frameElement on window: alert(frameElement.id); But this is not globally supported; you won’t get it in Google Chrome (at the time of writing; version 7) or in older versions of the other popular non-IE browsers.