Reputation: 3
A programmer installed jquery lightbox and everything was working fine on
http://www.ozhiphopshop.com.au/sub_photos.php?id=11
I wanted to use the exact same effect for the one image on
http://www.ozhiphopshop.com.au/product_detail.php?pro_id=69
In the included header file I've changed the changed the following script (which is working fine on the first page):
<script type="text/javascript">
$(function() {
$('#gallery a').lightBox();
$('#gallery1 a').lightBox();
});
</script>
to:
<script type="text/javascript">
$(function() {
$('a.pro_img').lightbox();
});
</script>
but that doesn't seem to work. And the linked file is opening in a new window.
The div class for the file I want the lightbox to work with is 'pro_img' which is why I made the change the way I did. I've made no changes to the css or the js files, which may be where I'm going wrong.
I'm not a programmer, so I've just been trying to reverse engineer what was done on the first page. I'm really interested in learning more about programming, hence the reason I'm doing it myself.
I've noticed the same question on here, but none of the answers seemed to relate to exactly what I'm dealing with.
Any help would be appreciated.
All the best, Michael
Upvotes: 0
Views: 518
Reputation: 14573
change
$('a.pro_img').lightbox();
to
$('div.pro_img a').lightbox();
Upvotes: 1