Skip to content

Instantly share code, notes, and snippets.

@choonkeat
Created April 6, 2009 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save choonkeat/90953 to your computer and use it in GitHub Desktop.
Save choonkeat/90953 to your computer and use it in GitHub Desktop.
/* iframe shim for facebox */
(function($) {
$(document).bind('reveal.facebox', function(event) {
$('#facebox')[0].shim = $('<iframe src="about:blank" frameborder="0"></iframe>').css({
top: $('#facebox').offset().top + "px",
left: $('#facebox').offset().left + "px",
height: $('#facebox').height() + "px",
width: $('#facebox').width() + "px",
position: 'absolute'
});
$('#facebox').before($('#facebox')[0].shim);
});
$(document).bind('close.facebox', function(event) {
if ($('#facebox')[0].shim) $('#facebox')[0].shim.remove();
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment