View Full Version : Move "close" to top in Lightbox 2.03a?
cdaniel
11-18-2009, 07:00 PM
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?
bluewalrus
11-18-2009, 08:39 PM
Search for this in lightbox.js
// calculate top and left offset for the lightbox
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).
cdaniel
11-18-2009, 11:36 PM
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.
bluewalrus
11-19-2009, 01:43 AM
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.
cdaniel
11-19-2009, 03:21 AM
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.
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/still&landscape/roadofcenturies2.htm
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.