我正在使用动画圆形进度条的jQuery脚本。现在,当点击开始按钮时,进度条就起作用。当用户自动滚动到div ID“stats”时,我想要启动此进度条。如何才能做到这一点?jQuery动画圆形进度条
我已经做了小提琴展示我到目前为止有:
https://jsfiddle.net/rpkcw236/9/
jQuery(document).ready(function($){
$('.pie_progress').asPieProgress({
namespace: 'pie_progress',
barsize: '2',
trackcolor: '#ececea',
barcolor: '#e6675f'
});
$('#button_start').on('click', function(){
$('.pie_progress').asPieProgress('start');
});
$('#button_finish').on('click', function(){
$('.pie_progress').asPieProgress('finish');
});
$('#button_go').on('click', function(){
$('.pie_progress').asPieProgress('go',50);
});
$('#button_go_percentage').on('click', function(){
$('.pie_progress').asPieProgress('go','50%');
});
$('#button_stop').on('click', function(){
$('.pie_progress').asPieProgress('stop');
});
$('#button_reset').on('click', function(){
$('.pie_progress').asPieProgress('reset');
});
});
这里是链接到脚本我使用:
http://www.jqueryscript.net/loading/Animated-Circle-Progress-Bar-with-jQuery-SVG-asPieProgress.html
_“我希望这个进度条在用户滚动到div ID”stats“时自动启动”_没有可滚动内容出现在https://jsfiddle.net/rpkcw236/7/? – guest271314
添加了占位符内容,以便现在可以滚动页面。 https://jsfiddle.net/rpkcw236/8/ –
'.asPieProgress'未定义在https://jsfiddle.net/rpkcw236/8/ – guest271314