Call shadowbox inside gallery.js
i have an image gallery and i want to add a shadowbox when i click on the
large image. The shadowbox is working on the HTML page, but when i try to
call him trough the gallery, it doesn't answer!
This .js script is called to be able to show the large image on the image
gallery.
// shows the large image that is associated to the $item
var $loader = $rgGallery.find('div.rg-loading').show();
$items.removeClass('selected');
$item.addClass('selected');
var $thumb = $item.find('img'),
largesrc = $thumb.data('large'),
title = $thumb.data('description');
$('<img/>').load( function() {
$rgGallery.find('div.rg-image').empty().append('<a
href="' + largesrc + '" rel="shadowbox" ><img src="' +
largesrc + '"/></a>');
if( title )
$rgGallery.find('div.rg-caption').show().children('p').empty().text(
title );
$loader.hide();
What should i do??
No comments:
Post a Comment