
jQuery lightBox plugin patch for horizontal layout designs
By: a guest on Mar 3rd, 2010 | syntax:
Diff | size: 1.04 KB | hits: 929 | expires: Never
This patch is to fix the position of the overlay and the main lightBox window".
Created by: Rodrigo Chacon
--- jquery.lightbox-0.5.js.old 2010-03-03 03:53:02.000000000 -0300
+++ jquery.lightbox-0.5.js 2010-03-03 03:50:18.000000000 -0300
-133,14 +133,16 @@
backgroundColor: settings.overlayBgColor,
opacity: settings.overlayOpacity,
width: arrPageSizes[0],
- height: arrPageSizes[1]
+ height: arrPageSizes[1],
+ "margin-left": $(window).scrollLeft()
}).fadeIn();
// Get page scroll
var arrPageScroll = ___getPageScroll();
// Calculate top and left offset for the jquery-lightbox div object and show it
$('#jquery-lightbox').css({
top: arrPageScroll[1] + (arrPageSizes[3] / 10),
- left: arrPageScroll[0]
+ left: arrPageScroll[0],
+ "margin-left": $(window).scrollLeft()
}).show();
// Assigning click events in elements to close overlay
$('#jquery-overlay,#jquery-lightbox').click(function() {