Starting at line #585 in the attached file you supply we find this function:
Code:
//
// updateNav()
// Display appropriate previous and next hover navigation.
//
updateNav: function() {
Element.show('hoverNav');
// If not first image in set, display prev image button
if(activeElement != 0){
Element.show('prevLink');
document.getElementById('prevLink').onclick = function() {
myLightbox.changeElement(activeElement - 1); return false;
}
}
// If not last image in set, display next image button
if(activeElement != (elementArray.length - 1)){
Element.show('nextLink');
document.getElementById('nextLink').onclick = function() {
myLightbox.changeElement(activeElement + 1); return false;
}
}
this.enableKeyboardNav();
},
Replace it with this one:
Code:
//
// updateNav()
// Display appropriate previous and next hover navigation.
//
updateNav: function() {
Element.show('hoverNav');
// Display prev image button
Element.show('prevLink');
document.getElementById('prevLink').onclick = function() {
var prev = activeElement != 0? activeElement - 1 : elementArray.length - 1;
myLightbox.changeElement(prev); return false;
}
// Display next image button
Element.show('nextLink');
document.getElementById('nextLink').onclick = function() {
var next = activeElement != (elementArray.length - 1)? activeElement + 1 : 0;
myLightbox.changeElement(next); return false;
}
this.enableKeyboardNav();
},
Bookmarks