html - hover IE 10/9/8 doesn't work on transparent element -
i have:
- single page app
- css mega menu opens on hover
when user clicks link, menu doesn't go away in ie 10/9/8 when click on text of link. if click on spacing around text goes away.
pulling hair out trying figure out... works fine in chrome/ie11
here code makes work chrome/ie11:
var $a = _i.$(jqevent.target); var $menu = $a.closest('.areanav'); var $tempblockout = _i.$('<div class="tempblockout"></div>'); $tempblockout.appendto($menu.parent()); var z = $a.closest('.megamenu').css('z-index'); $tempblockout.css({ width: '50px', height: '50px', background: 'transparent', position: 'absolute', 'z-index': z }).position({ of: jqevent }); settimeout(function () { $tempblockout.remove(); }, 100);
i'm placing transparent div cursor hover gets reset , css menu disappears when user selects link.
the following code fixes issue ie10/9/8
$tempblockout.css({ width: '50px', height: '50px', background: '#fff', opacity: 0, position: 'absolute', 'z-index': z }).position({ of: jqevent });
changed background #fff, , set opacity zero. apparently ie10/9/8 not register hover on transparent elements.
Comments
Post a Comment