1

I'm trying to add a delay to a rotation, although it appears to be having no effect.

The taps should spin at the same time as the image slides in.

URL: http://dev.rapweb.co.uk/jln/index.htm

Any help would be much appreciated.

var rotation = function() {
    $("#coldTap").delay(1000).rotate({
        angle: 0,
        animateTo: -720,
        easing: function(x, t, b, c, d) {
            // t: current time, b: begInnIng value,
            // c: change In value, d: duration
            return c * (t / d) + b;
        }
    });
    $("#hotTap").delay(1000).rotate({
        angle: 0,
        animateTo: -720,
        easing: function(x, t, b, c, d) {
            // t: current time, b: begInnIng value,
            // c: change In value, d: duration
            return c * (t / d) + b;
        }
    });
}

$(document).ready(function() {
    $("#plumbingServices").animate({
        opacity: "1.0"
    }, "fast") <!-- Plumbing Services Fade In -->
    $("#plumbingServices").ready(rotation)
    $("#plumbingServices").delay(1000).animate({
        right: "0"
    }, "slow", function() { <!-- Plumbing Services Slide In -->
        $("#plumbingServices").ready(carouselLoop)
    });
});​
4

1 回答 1

0

我已经设法通过在调用旋转的函数上设置超时来解决这个问题。setTimeout("$('#plumbingServices').ready(rotation)", 1000);感谢任何花时间看这个的人。

于 2012-09-06T08:28:05.920 回答