简体   繁体   English

引导程序加载栏+按钮

[英]Bootstrap loading bar + button

I'm trying to make a download page for my website. 我正在尝试为我的网站制作一个下载页面。 I need to it have an animated loading bar and when the loading bar is complete the download button should then appear. 我需要它有一个动画加载栏,加载栏完成后,应该会出现下载按钮。 I made it in jsfiddle and it all works there but it doesnt seem to work on my website. 我在jsfiddle中完成了所有工作,但在我的网站上似乎没有工作。 I am using an updated version of bootstrap on my website but I don't see why that should make a difference. 我在网站上使用的是Bootstrap的更新版本,但我不明白为什么这会有所作为。

Summary: The loading bar on my website doesn't actually load 摘要:我网站上的加载栏实际上并未加载

My website: http://coden.gaming.multiplay.co.uk/downloads/download/download_sourcecode/ 我的网站: http : //coden.gaming.multiplay.co.uk/downloads/download/download_sourcecode/

$(".btn-success").hide();
var progress = setInterval(function () {
       var $bar = $('.bar');
      if ($bar.width() >= 400) {
       clearInterval(progress);
       $(".btn-success").show();
       $('.progress').removeClass('active');
   } else {
       $bar.width($bar.width() + 40);
  }
 }, 115);

http://jsfiddle.net/9NAcb/5/ http://jsfiddle.net/9NAcb/5/

You use Bootstrap 2 in your code and Bootstrap 4 CSS. 您可以在代码和Bootstrap 4 CSS中使用Bootstrap 2。 Boostrap 4 CSS has .progress-bar class. Boostrap 4 CSS具有.progress-bar类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM