I am loading images externally using jQuery load function.. but not able add light box..
am very new to jquery.
var href = $('#images').attr('href');
$('#images').click(function(){
var toLoad = $(this).attr('href')+' #content';
$('#content').hide('fast',loadContent);
$('#load').remove();
$('#wrapper').append('<span id="load">LOADING...</span>');
$('#load').fadeIn('normal');
window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-3);
function loadContent() {
$('#content').load(toLoad,'',showNewContent());
}
function showNewContent() {
$('#content').show('normal',hideLoader());
}
function hideLoader() {
$('#load').fadeOut('normal');
}
return false;
});
this function is in $(document).ready() and now i need to add function below so that images dynamically loaded become part of lightbox.
$('.gallery a').lightBox({txtImage: 'Design'})
What am doing is... calling the file portfolio.php and taking the html inside the #content div and loading it in the #content div in the page the user is viewing.
Please help with code if possible.