Multiple Images

Multiple Images

Hello All, I am new to this forum... hope everyone is well.

I have a question with regards to using fancybox/jquery within my dynamic php site.

This is my htmp/php code...

//
<a id="example6" href="uploads/originals/news/<?php echo $rows['news_photo']?>"><img src="uploads/120x72/news/<?php echo $rows['news_photo']?>" alt="example6" width="120" height="72" class="friendpicsborder4" title="view larger pic" /></a>
//

This is my jquery code...

//
<script type="text/javascript">
$(document).ready(function() {
$("a#example6").fancybox({
'titlePosition' : 'outside',
'overlayColor' : '#000',
'overlayOpacity' : 0.9
});
});
</script>
//

The issue I have if more than 1 image is outputed (from the php query), the fancybox does not work.

If 1 image is outputed the fancybox works perfectly, however in reality there will be lots of images.

Any ideas how I can get the jquery to load fancybox?

Thanks

Russ





    • Topic Participants

    • russ