Results 1 to 5 of 5

Thread: Move "close" to top in Lightbox 2.03a?

  1. #1
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Move "close" to top in Lightbox 2.03a?

    Can someone tell me what I need to change to move this to the top right instead of where it is on the bottom right?

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Search for this in lightbox.js
    // calculate top and left offset for the lightbox
    Code:
         var arrayPageScroll = document.viewport.getScrollOffsets();
     adjust this line------>    var lightboxTop = 8;
            var lightboxLeft = arrayPageScroll[0];
            this.lightbox.setStyle({ top: lightboxTop + 'px', left: lightboxLeft + 'px' }).show();
    If not that than please be more specific, using "this" with nothing else is not that clear (not that I'm a clear explainer).

  3. #3
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I will examine and try your suggestion.

    "This" refers to what is in my subject - the "close" for the window. I want the close at the top right instead of bottom right.

    Thanks for responding.

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Yea but I dont have any of your code and if you altered it all its different, or if your missing something we won't know.

  5. #5
    Join Date
    May 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If you mean code in the lightbox.js, I have not altered any of that except for the path for next/prev/loading/close graphics. I wouldn't know how to alter it. But, in the version of Lightbox I mentioned, it only has this reference to the variable you mentioned.

    Code:
    var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10);
    If you go to this page on a web site I created, you can see that because the image is so large (click the magnifier glass), it's perhaps annoying to the viewer to have to scroll down so far to close. Even better might be the close at the top and the bottom: http://www.portraitartist.com/spinks...centuries2.htm
    Last edited by cdaniel; 11-19-2009 at 01:03 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •