Last active
December 20, 2015 12:59
-
-
Save johno/6135663 to your computer and use it in GitHub Desktop.
Duck IE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From http://stackoverflow.com/questions/3680429/click-through-a-div-to-underlying-elements/4839672#4839672 | |
$('.duck_ie').click(function(e) { | |
var left = $(window).scrollLeft(); | |
var top = $(window).scrollTop(); | |
//hide the overlay for now so the document can find the underlying elements | |
$(this).css('display','none'); | |
//use the current scroll position to deduct from the click position | |
$(document.elementFromPoint(e.pageX-left, e.pageY-top)).click(); | |
//show the overlay again | |
$(this).css('display','block'); | |
}); | |
$('.duck_ie_again').click(function(e)) { | |
$(this).parent().trigger(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment