灯箱图库问题

时间:2012-05-04 18:10:09

标签: javascript html gallery image-gallery

我希望有人可以帮我解决这个问题...

我希望这6幅图像中的每一幅都是它自己的画廊,而我的生命就是超越迷失!

这是JS代码:

$(function(){
    // lightbox image
    $(".lightbox-image").append("<span></span>");

    $(".lightbox-image").hover(function(){
        $(this).find("img").stop().animate({opacity:0.5}, "normal")
    }, function(){
        $(this).find("img").stop().animate({opacity:1}, "normal")
    });
});

这是HTML:

    <div class="pad_left1">
          <div class="wrapper pad_bot1">
            <div class="cols"> <a href="images/big_img1.jpg" class="lightbox-image" rel="prettyPhoto[group1]" title="Company Logos"><img src="images/page3_img1.png" alt=""></a>

              <p><strong class="font1">Company Logos</strong>???enter text here???<br><br>
</p>
            </div>
            <div class="cols pad_left1"> <a href="images/big_img2.jpg" class="lightbox-image" rel="prettyPhoto[group1]" title="Business Cards"><img src="images/page3_img2.png" alt=""></a>
              <p><strong class="font1">Business Cards</strong>???enter text here???<br>
</p>
            </div>
          </div>
          <div class="wrapper pad_bot1">
            <div class="cols"> <a href="images/big_img3.jpg" class="lightbox-image" rel="prettyPhoto[group1]" title="Photgraphy/Photo Edits"><img src="images/page3_img3.png" alt=""></a>
              <p><strong class="font1">Photography/Photo Edits</strong>???enter text here???<br><br>
</p>
            </div>
            <div class="cols pad_left1"> <a href="images/big_img4.jpg" class="lightbox-image" rel="prettyPhoto[group1]" title="Band Logos/Album Covers"><img src="images/page3_img4.png" alt=""></a>
              <p><strong class="font1">Band Logos/Album Covers</strong>???enter text here???<br>
</p>
            </div>
          </div>
          <div class="wrapper pad_bot1">
            <div class="cols"> <a href="images/big_img5.jpg" class="lightbox-image" rel="prettyPhoto[group1]" title="Random Designs"><img src="images/page3_img5.png" alt=""></a>
              <p><strong class="font1">Random Designs</strong>???enter text here???<br>
</p>
            </div>
            <div class="cols pad_left1"> <a href="images/big_img6.jpg" class="lightbox-image" rel="prettyPhoto[group1]" title="Websites"><img src="images/page3_img6.png" alt=""></a>
              <p><strong class="font1">Websites</strong>???enter text here???<br>
</p>
            </div>
          </div>
        </div>

1 个答案:

答案 0 :(得分:0)

如果您需要一套图库

,可以通过这种方式进行简单的尝试
<div>
<a href="images/image-1.jpg" rel="prettyPhoto[group1]">image #1</a>
<a href="images/image-2.jpg" rel="prettyPhoto[group1]">image #2</a>
<a href="images/image-3.jpg" rel="prettyPhoto[group1]">image #3</a>
</div>

<div>
<a href="images/image-4.jpg" rel="prettyPhoto[group2]">image #4</a>
<a href="images/image-5.jpg" rel="prettyPhoto[group2]">image #5</a>
<a href="images/image-6.jpg" rel="prettyPhoto[group2]">image #6</a>
</div>