Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/08/2009, 20:17
Tain
 
Fecha de Ingreso: agosto-2009
Mensajes: 5
Antigüedad: 14 años, 8 meses
Puntos: 0
Respuesta: añadir links a las imágenes con lightbox

Hola urgido, para el botón son tres partes las que añadí en el lightbox.js, las marco en rojo.


lightboxOptions = Object.extend({
fileLoadingImage: 'images/loading.gif',
fileBottomNavCloseImage: 'images/closelabel.gif',
fileBottomNavLinkImage: 'images/link.gif',


Builder.node('div',{id:'bottomNav'}, [
Builder.node('a',{id:'bottomNavClose', href: '#' },
Builder.node('img', { src: lightboxOptions.fileBottomNavCloseImage })
),
Builder.node('a',{id:'bottomNavLink', href: '#' },
Builder.node('img', { src: lightboxOptions.fileBottomNavLinkImage })

)
])
])
)
]));



$('bottomNavClose').observe('click', (function(event) { event.stop(); this.end(); }).bind(this));
$('bottomNavLink').observe('click', (function(event) { event.stop();
var objHead = $$('head')[0];
objHead.appendChild(Builder.node('link',{id:'light boxPrintSheet', media:'link', type:'text/css', href: 'css/lightbox.css', rel:'stylesheet'})); window.open('link.html','popup','toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no, width=400, height=400'); return false;
}));


var th = this;
(function(){
var ids =



Al pulsar el botón se abre la página " link.html ". Aparte en el lightbox.css también hay que añadir lo siguiente para situar el botón:

#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
#imageData #bottomNavLink{ width: 200px; float: right; padding-bottom: 0.7em; outline: none;}