多个jquery画廊

时间:2012-09-03 21:36:13

标签: javascript jquery

我正在尝试将两个jQuery图库分开,因此它们不会在我的html页面上链接:

http://mashanova.com/myFAQ/faqGallery.html#

这是html:

                                                                                       

这里是javascript:

$(document).ready(function(){


    $('.gallery_thumbnails a').click(function(e){

        e.preventDefault();


        $('.gallery_thumbnails a').removeClass('selected');
        $('.gallery_thumbnails a').children().css('opacity','1');

        $(this).addClass('selected');
        $(this).children().css('opacity','.4');



        var photo_fullsize = $(this).attr('href');
        var photo_preveiw = photo_fullsize.replace('fullsize','preview');


        $('.gallery_preview').html('<a href="'+photo_fullsize+'" style="background-image:url('+photo_preveiw+');"></a>');


    });


});

0 个答案:

没有答案