A
A
Alexander2012-04-19 10:25:41
JavaScript
Alexander, 2012-04-19 10:25:41

jQuery carousel vertical-align?

There is a carousel script webdesignandsuch.com/posts/fancymoves/index.html I
figured out all the customization settings, but I can’t change the alignment of the products: I want to invert so that the central product is higher than the side ones (now it is lower).
Explain how... I'm just learning jQuery.
Link to the archive with the script .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Bobylev, 2012-04-19
@Alexx_ps

In the script, you need to change (replace with the following) two functions in which, in addition to changing the image width and font size, the top indent also changes:

// Resize panels to normal
base.returnToNormal = function(num, time) {
    var panels = base.$panels.not(':eq(' + (num - 1) + ')').removeClass(base.options.currentPanel);
    if (base.options.reducedSize === 1) {
        panels.css({
            width: base.regWidth
        }); // excluding fontsize change to prevent video flicker
    } else {
        panels.animate({
            width: base.regWidth,
            fontSize: base.options.reducedSize + 'em',
            marginTop: (100 * base.options.reducedSize + parseInt(panels.css('padding')) * 2) + 'px'
        }, (time === 0) ? time : base.options.speed);
    }
};

// Zoom in on selected panel
base.growBigger = function(num, time, flag) {
    var panels = base.$panels.eq(num - 1);
    if (base.options.reducedSize === 1) {
        panels.css({
            width: base.curWidth
        }); // excluding fontsize change to prevent video flicker
        if (base.initialized) {
            base.completed(num, flag);
        }
    } else {
        panels.animate({
            width: base.curWidth,
            fontSize: '1em',
            marginTop: '0'
        }, (time === 0) ? time : base.options.speed, function() {
            // completed event trigger
            // even though animation is not queued, trigger is here because it is the last animation to complete
            if (base.initialized) {
                base.completed(num, flag);
            }
        });
    }
};​

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question