Tag: 进度

读取位置指示器基于DIV而不是整个页面

我想在我的网站上显示阅读位置指示器。 不幸的是,该网站比阅读的文本长得多。 内容位于名为“content-wrapper”的单个DIV中。 目前我正在使用HTML5进度元素( https://dev.w3.org/html5/spec-preview/the-progress-element.html )并将其添加到我的网站,如下例所示: https:/ /css-tricks.com/reading-position-indicator/ 它到目前为止工作正常。 问题是,进度是根据整个页面的长度计算的。 有没有办法限制单个DIV的进度? 这是我的JS代码: $(document).on(‘ready’, function() { var winHeight = $(window).height(), docHeight = $(document).height(), progressBar = $(‘progress’), max, value; /* Set the max scrollable area */ max = docHeight – winHeight; progressBar.attr(‘max’, max); $(document).on(‘scroll’, function(){ value = $(window).scrollTop(); progressBar.attr(‘value’, value); }); });

jQuery Slider – 进度条

类似于: 带有进度条的Jquery滑块 我有这个滑块和进度条,但我希望进度条与“上一个”和“下一个”按钮同步。 因此,当您单击“下一步”时,进度条将从头开始。 http://jsfiddle.net/aidenguinnip/8rJws/ $(window).load(function(){ var currentIndex = 0;// store current pane index displayed var ePanes = $(‘#slider .panel’), // store panes collection time = 3000, bar = $(‘.progress_bar’); function showPane(index){// generic showPane // hide current pane ePanes.eq(currentIndex).stop(true, true).fadeOut(); // set current index : check in panes collection length currentIndex = index; if(currentIndex = […]

分段进度条(jQuery UI)

我正在尝试将jQuery UI进度条分成几个部分。 有人知道我会怎么做吗? 示例:(2 – 视觉设计:03 http://wiki.jqueryui.com/w/page/12138028/Progressbar ) (我目前正在使用背景图片,但这不实用。)

HTML加载动画

我有一个网站在页面未加载时丢失布局方案。 我想做的是将动画链接到加载进度,如进度条但没有条形图。 例如,一个简单的动画,可以将进度链接到徽标的不透明度。 因此,当页面加载50%时,徽标的不透明度为50%; 当徽标为100%时,页面被加载,加载进度为.fadeOut() 。 我知道我可以使用$(window).load()来隐藏动画 。 我不知道如何关联动画的进度和不透明度。 是否有一种“简单”的方法来实现这一目标? 我搜索了jQuery plugins ,但我只找到了进度条加载。

可以使用xhrFields将onprogressfunction添加到jQuery.ajax()吗?

正如这里建议的那样: https : //gist.github.com/HenrikJoreteg/2502497 ,我正在尝试将onprogressfunction添加到我的jQuery.ajax()文件上传中。 上传工作正常,并且onprogress事件正在触发,但不是我预期的 – 而不是在某个时间间隔重复触发,它只在上传完成时触发一次。 有没有办法指定onprogress刷新的频率? 或者,我是否正在尝试做一些无法做到的事情? 这是我的代码: $.ajax( { async: true, contentType: file.type, data: file, dataType: ‘xml’, processData: false, success: function(xml) { // Do stuff with the returned xml }, type: ‘post’, url: ‘/fileuploader/’ + file.name, xhrFields: { onprogress: function(progress) { var percentage = Math.floor((progress.total / progress.totalSize) * 100); console.log(‘progress’, percentage); […]

预加载百分比 – javascript / jquery

我做了谷歌搜索,我找不到用百分比加载的方法。 有谁知道我怎么能找到一个例子? 我需要一个网站的预加载从0到100没有条,在显示内容之前,但我找不到任何例子。