Guest

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
download  |  raw  |  embed  |  report abuse
Copied
  1. This patch is to fix the position of the overlay and the main lightBox window".
  2. Created by: Rodrigo Chacon
  3.  
  4. --- jquery.lightbox-0.5.js.old  2010-03-03 03:53:02.000000000 -0300
  5. +++ jquery.lightbox-0.5.js      2010-03-03 03:50:18.000000000 -0300
  6.  -133,14 +133,16 @@
  7.                                 backgroundColor:        settings.overlayBgColor,
  8.                                 opacity:                        settings.overlayOpacity,
  9.                                 width:                          arrPageSizes[0],
  10. -                               height:                         arrPageSizes[1]
  11. +                               height:                         arrPageSizes[1],
  12. +                                "margin-left":          $(window).scrollLeft()
  13.                         }).fadeIn();
  14.                         // Get page scroll
  15.                         var arrPageScroll = ___getPageScroll();
  16.                         // Calculate top and left offset for the jquery-lightbox div object and show it
  17.                         $('#jquery-lightbox').css({
  18.                                 top:    arrPageScroll[1] + (arrPageSizes[3] / 10),
  19. -                               left:   arrPageScroll[0]
  20. +                               left:   arrPageScroll[0],
  21. +                                "margin-left": $(window).scrollLeft()
  22.                         }).show();
  23.                         // Assigning click events in elements to close overlay
  24.                         $('#jquery-overlay,#jquery-lightbox').click(function() {