开发者

jQuery photo carousel (that looks like a real carousel)? [closed]

开发者 https://www.devze.com 2023-01-01 07:54 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

I am on the lookout for a jQuery photo carousel that can display 3 images at a time, and circle through x amount of photos (and when reaching the last, starting with the first photo again).

I made a quick mock-up of what i am开发者_如何转开发 looking for:

jQuery photo carousel (that looks like a real carousel)? [closed]

So there is 3 photos vissible, the middle one beeing the 'main' one and a bit bigger than the previous and next (left and right). Upon clicking the next/previous arrows the next or previous photo slides into the middle and thereby becomes the main photo.

Any ideas to where i can find such a jQuery plugin/script?


UPDATED 3 Improved Version ( With Fancybox )

This is for the sake and for all people that asked me for that! ;)

DEMO: http://so.lucafilosofi.com/jquery-photo-carousel-that-looks-like-a-real-carousel/


This is for OP only:

UPDATED 2 - With ( Next Prev ) Buttons - DEMO: http://jsbin.com/iduyu

$(function() {
$('.carousel').carousel();
});

(function($) {
$.fn.carousel = function() {
// 5 minutes lightweight carousel
// Copyright/Author (c) Luca Filosofi > aseptik@gmail.com
// License Public
    $carousel = $(this);
    $carousel.wrap('<div id="carousel_wrapper"></div>');
    $carousel.parent().append('<div class="button" id="left"></div>'+
                              '<div class="button" id="right"></div>');

    $('img',this).attr('class', 'inactive');
    $('img:eq(1)',this).attr('class', 'left');
    $('img:eq(2)',this).attr('class', 'active');
    $('img:eq(3)',this).attr('class', 'right');

    $carousel.fadeIn(500);

    $('.button').live('click', function(e) {
        e.preventDefault();

        var mode = this.id;
        var $button = $('.' + mode );

        $button.css({ 
            'z-index' : 9999 , 
            'opacity': 0.8
        }).animate({
            'left': '90px',
            'width': '320px',
            'top': '0px',
            'opacity': 1
        }, 500, function() {

          //lightbox
          $(this).attr({'class':'active'})
          .removeAttr('style');
        });

        $button.prev().css({
            'opacity': 0.5 
        }).animate({
            'left': '0px',
            'width': '240px',
            'top': '30px',
            'opacity': 1
        }, 400, function() {

            $(this).attr('class', 'left').removeAttr('style');
            $(this).prevAll().attr('class', 'inactive');
        });

        $button.next().css({
            'opacity': 0.5 
        }).animate({
            'left': '260px',
            'width': '240px',
            'top': '30px',
            'opacity': 1
        }, 400, function() {

            $(this).attr('class', 'right').removeAttr('style');
            $(this).nextAll().attr('class', 'inactive');
        });

        if (mode == 'left') 
        $('img:last' , $carousel).prependTo($carousel);
        if (mode == 'right') 
        $('img:first' , $carousel).appendTo($carousel);

    });
}
})(jQuery);​

you are looking for this: http://web.enavu.com/demos/3dcarouselwip/


Try this:

Cloud Carousel - A 3d Carousel in Javascript

It seems to do exactly what you're looking for

0

精彩评论

暂无评论...
验证码 换一张
取 消