Using JQuery Lightbox within AJAX loaded content -


hey. noob problem i'm not enough fix it. basically... have gallery loading page via ajax. looks this:

    <div id="gallery">             <a href="image1.jpg"><img src="image1thumb.jpg" /></a>             <a href="image2.jpg" title=""><img src="image2thumb.jpg" /></a>     </div> 

but because it's being loaded in ajax content, jquery/lightbox not working , i've no idea how can script run/recognise newly loaded content.

thanks!

[note: jquery lightbox using.]

you need run code light box after ajax content has loaded.

e.g.

$.get('gallery.html',function(data){     $('body').append(data);     $('#gallery a').lightbox(); },'html'); 

Comments