简体   繁体   English

在 Bower 插件上加载数据以获取进度条

[英]Load data on Bower plugin for a progress bar

I recently came across bower a web-tool to develop a progress bar.我最近遇到了 bower 一个用于开发进度条的网络工具。 I have implemented a progress bar as series of radio buttons aligned next to each other.我已经实现了一个进度条作为一系列彼此相邻的单选按钮。 The concept is to load data from a .edf file to the browser upon clicking the radio buttons.这个概念是在单击单选按钮时将数据从.edf文件加载到浏览器。 All these work fine before I apply the Bower scripts.在我应用 Bower 脚本之前,所有这些都可以正常工作。 When I make a transition from one radio button to another I would like to have an effect which shows a transition while clicking on each button.当我从一个单选按钮转换到另一个单选按钮时,我希望有一种效果,即在单击每个按钮时显示转换。 Can I get some advice here if I can achieve this by applying any of the bootstrap classes or to modify the code existing?如果我可以通过应用任何引导程序类或修改现有代码来实现这一点,我可以在这里获得一些建议吗? The snippet I have added is not loading the Bower libraries, otherwise it would look similar to this.我添加的代码段没有加载 Bower 库,否则它看起来与此类似。

在此处输入图片说明

 $('.radios').radiosToSlider({ animation: true, });
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"/>= <script type="text/javascript" src="bower_components/radios-to-slider/dist/jquery.radios-to-slider.js"/> <link rel="stylesheet" type="text/css" href="bower_components/radios-to-slider/dist/radios-to-slider.css"/> <div class="radios"> <label for="option1" class="btn"> <input id="option1" name="options" type="radio" autocomplete="off" onchange="dataSegment(0)" checked> </label> <label for="option2" class="btn"> <input id="option2" name="options" type="radio" autocomplete="off" onchange="dataSegment(1)"> </label> <label for="option3" class="btn"> <input id="option3" name="options" type="radio" autocomplete="off" onchange="dataSegment(2)"> </label> <label for="option4" class="btn"> <input id="option4" name="options" type="radio" autocomplete="off" onchange="dataSegment(3)"> </label> <label for="option5" class="btn"> <input id="option5" name="options" type="radio" autocomplete="off" onchange="dataSegment(4)"> </label> </div>

Your problem is that you are using a URL that is local to a website.您的问题是您使用的是网站本地的 URL。 Notice that you have no protocol in the URL ( https:// , http:// , etc).请注意,您在 URL 中没有协议( https://http://等)。 I did a little digging, and the URL you should be using is http://rubentd.com/bower_components/radios-to-slider/dist/jquery.radios-to-slider.js我做了一些挖掘,你应该使用的 URL 是http://rubentd.com/bower_components/radios-to-slider/dist/jquery.radios-to-slider.js

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

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