I am using lightbox2. For an example - On a single webpage page there are thumbnail images of 2 cats, 2 dogs and 2 pigs. The thumbnails open the large images. My code is: <a href="cat_1.jpg" rel="lightbox[cat]" > <img src="cat_1_T.jpg" /> </a> <a href="cat_2.jpg" rel="lightbox[cat]" > <img src="cat_2_T.jpg" /> </a> <a href="dog_1.jpg" rel="lightbox[dog]" ><img src="dog_1_T.jpg" /> </a> <a href="dog_2.jpg" rel="lightbox[dog]" ><img src="dog_2_T.jpg" /></a> etc.. the pig is coded same. I want the 3 separate image groups, cats, dogs, pigs just to show 2 of 2 cats or 2 of 2 dogs or 2 of 2 pigs, depending on which group is selected. What I get are 6 of 6 images, cats, dogs, pigs all in one group. Is it possible to have 3 different groupings one one page?
If you mean this lightbox2, it definitely does allow separate groups. If you can give us a link to your page, we can find out what is going wrong. If you can't get it working, try one of these other lightboxes: http://planetozh.com/projects/lightbox-clones/
Thanks for that website, that is the one I got my information from. If there is a way to separate them I have something wrong http://www.rickzwebz.com/fire_Places/extras.php
Ah right, some guy has taken lightbox2 and turned it into a jquery plugin, but he also changed the method by which images are grouped. Your code in lightbox.js selects all of the images in the image_Single_Container div, but it seems to ignore the lightbox attribute. That needs to be changed but I'm not sure what to. Maybe this will work: $(function() { $('a[@rel*=lightbox]').lightBox(); }); Code (markup):
Thanks for your reply but that did not work, it removed the light box function totally. If the problem is that I changed it into a jquery plugin, how did I do that?
What I meant was that someone else has turned lightbox2 into a plugin. This code should work. $(function() { $('a[@rel*="lightbox[grates]"]').lightBox(); $('a[@rel*="lightbox[screens]"]').lightBox(); $('a[@rel*="lightbox[tools]"]').lightBox(); }); Code (markup): Another way is to wrap each section in a container ( <div id='grates'>, <div id='screens'>, <div id='tools'> ) and use this code. $(function() { $('#grates a').lightBox(); $('#screens a').lightBox(); $('#tools a').lightBox(); }); Code (markup): You can remove the rel attributes from the links if you use this method.
Thank you Cash Nebula!! Your solution of using divs worked exactly the way I want. Excellent help... Thanks again...