Animation 使用航路点启动Jquery动画

Animation 使用航路点启动Jquery动画,animation,jquery-plugins,jquery-waypoints,jquery-knob,Animation,Jquery Plugins,Jquery Waypoints,Jquery Knob,我正在使用Jquery旋钮,它会在页面加载时自动运行。我似乎不知道在这个函数中插入航路点调用的位置。任何建议都将不胜感激 <script> $(document)(function () { $('.dial').knob({ min: '0', max: '100',

我正在使用Jquery旋钮,它会在页面加载时自动运行。我似乎不知道在这个函数中插入航路点调用的位置。任何建议都将不胜感激

            <script>
                 $(document)(function () {
                    $('.dial').knob({
                        min: '0',
                        max: '100',
                        readOnly: true
                    });

                    $('.dial').each(function(){
                        $(this).animate({
                            value: $(this).data('number')
                        },{
                            duration: 950,
                            easing: 'swing',
                            progress: function () {
                                $(this).val(Math.round(this.value)).trigger('change');
                            } // progress:function
                        }); // middle
                    }); //dial.each.function
                }); // function
                </script>

$(文件)(功能(){
$('.dial')。旋钮({
最小值:“0”,
马克斯:“100”,
只读:正确
});
$('.dial')。每个(函数(){
$(此)。设置动画({
值:$(此).data('number'))
},{
持续时间:950,
放松:"摇摆",,
进展:职能(){
$(this.val(Math.round(this.value)).trigger('change');
}//进度:函数
});//中间
});//dial.each.function
}); // 功能

以下各项应能起作用

$(document)(function () {
    $('.thing').waypoint(function(direction) {  // Change ".thing" to the div class containing your knobs //
        $('.dial').knob({
           min: '0',
           max: '100',
           readOnly: true
         });

    $('.dial').each(function(){
        $(this).animate({
        value: $(this).data('number')
        },{
            duration: 950,
            easing: 'swing',
            progress: function () {
            $(this).val(Math.round(this.value)).trigger('change');
            } // progress:function
            }); // middle
        }); //dial.each.function
    });
}); // function