Java脚本中的CountTO

时间:2018-03-05 14:07:21

标签: javascript

我有countto功能,当它在代码中一次时它工作正常。我想为vnumber1和vnumber2放置两次,如果我将vnumber1代码设置为有效,如果我输入vnumber2代码 - 它可以工作,但是如果它们一个接一个就不起作用,那么代码中缺少什么?我是菜鸟。吹它是代码:

clearInterval(intervalProgress);
$('.web1-step2').slideUp();
$('.web1-step3').slideDown();
$('.userJS').html($('.username-input').val());

$('.vNumberJS').countTo({
    from: 10,
    to: $('.vNumber-input').val(),
    speed: 1000,
    refreshInterval: 1,
    onComplete: function(value) {
        $('.vNumberJSthick').css('opacity', '1');
        $('.vNumber2JS').countTo({
            from: 10,
            to: $('.vNumber2-input').val(),
            speed: 1000,
            refreshInterval: 1,
            onComplete: function(value) {
                $('.vNumber2JSthick').css('opacity', '1');
                setTimeout(function() {
                    $('.web1-step3').fadeOut(function() {
                        $('.web1-offers').fadeIn();
                    });
                });
            }
        });
    }
});

vNumber2代码,如果我删除它就可以正常工作,我想把它们都放在一边,哪有错?

0 个答案:

没有答案