Tag: twitter bootstrap

Bootstrap轮播,自动循环然后停止

我正在使用twitter bootstrap和轮播function。 标记如下所示。 我试图在页面加载时实现一些东西,1。旋转木马在第一张幻灯片上开始并保持在那里(比方说500ms)。 然后它移动到幻灯片2并永远停止。 只有2张幻灯片,用户可以使用箭头在它们之间移动,但这不应该触发幻灯片的持续循环。 (如果困难,这不太重要)。 我已经尝试过更改旋转木马控件,但我无法弄明白: http : //twitter.github.com/bootstrap/javascript.html#carousel 从: $(‘.carousel’).carousel({ interval: 3000 }) 至: $(‘.carousel’).carousel({ interval: false }).carousel(1).delay(‘500’); 当我选择后一个选项时,旋转木板会在我按箭头后连续滚动,但通常不会。 我已经包含了我的旋转木马标记。 希望这可以帮助。 脑部比我的小豌豆大的人有什么想法或指针吗? Heading 1Strapline 1 Heading 2 Strapline 2 ‹ ›

引导带时钟选择器(clockpicker不是一个function)

我是bootstrap和jquery的初学者,当我尝试使用clockpicker包进行引导时,我遇到了这个错误。 未捕获的TypeError:$(…)。clockpicker不是函数。 Time Slot Slot Name Time Slot Time SUBMIT $(‘.clockpicker’).clockpicker() .find(‘input’).change(function(){ // TODO: time changed console.log(this.value); }); $(‘#demo-input’).clockpicker({ autoclose: true }); if (something) { // Manual operations (after clockpicker is initialized). $(‘#demo-input’).clockpicker(‘show’) // Or hide, remove … .clockpicker(‘toggleView’, ‘minutes’); }

“未捕获的TypeError:$(…)。popover不是函数”RoR – Bootstrap – jQuery

我已经在SO上检查了这个问题因为我有类似rails的问题。 我正在努力使一个AJAX请求工作(查找一些金融代码),我认为我对我的代码很好(至少我希望)但我仍然得到这个奇怪的错误: bootstrap.self-fdc98dee79ee88255e10cac6caa91338165cb76cf0d263744d8d90011fc2ef8f.js:3未捕获TypeError:$(…)。popover不是HTMLDocument中的函数。 (bootstrap.self-fdc98dee79ee88255e10cac6caa91338165cb76cf0d263744d8d90011fc2ef8f.js:3)在火(jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js:3233)在Object.fireWith [按resolveWith](jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js:3363)在Function.ready(jquery的。 self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js:3583)at HTMLDocument.completed(jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js:3618) 这是我的脚本: var init_stock_lookup; init_stock_lookup = function() { $(‘#stock-lookup-form’).on(‘ajax:success’, function(event, data, status) { $(‘#stock-lookup’).replaceWith(data); init_stock_lookup(); }) } $(document).ready(function() { init_stock_lookup(); }) 这是页面: Search for stocks Look up a stock Symbol: Name: Price: gem文件: source ‘https://rubygems.org’ git_source(:github) do |repo_name| repo_name = “#{repo_name}/#{repo_name}” unless repo_name.include?(“/”) “https://github.com/#{repo_name}.git” end # Bundle edge Rails […]

在粘贴底部到达并向后滚动顶部后,Affix Bootstrap闪烁

我有一个小的单页面布局网站,它使用Bootstrap的Affix-Plugin来修复sidenav-affix-top / affix-switch工作正常,但如果我到达affix-bottom我有2个问题: 第一个:sidenav在第10个列表项之前被切断 第二:如果我滚动回到顶部,那么词缀底部和词缀类似于口吃。 附加底部被删除,附加添加,并在几毫秒内反过来。 标记: Wissensdatenbank Überpunkt Wissendatenbank Überall dieselbe alte Leier. Das Layout ist fertig, der Text lässt auf sich warten. Damit das Layout nun nicht nackt im Raume steht und sich klein und leer vorkommt, springe ich ein: der Blindtext. Genau zu diesem Zwecke erschaffen, immer im Schatten meines großen Bruders […]

jQuery Validate插件,Bootstrap,Jasny Bootstrap文件输入RegEx – validation在Firefox中工作不在Chrome / IE中

好吧,请耐心等待,因为这个事情相当复杂,不仅仅是为了解释 – 我们正在尝试为文件上传提供“友好”的客户端validation,确保他们试图上传的文件中不存在任何非法字符(是的,我们也进行服务器端validation,但是希望允许用户在尝试上传之前修复文件中的任何非法字符。 我们还使用Bootstrap 2.1.0和Jasny的Bootstrap文件输入样式。 我们有一个用于jQuery Validate的RegEx适用于常规输入,但在这种情况下,validation是触发文件名中是否存在非法字符,并且validation消息未正确清除等。 这是一个小提琴的链接,以更好地说明它: http : //jsfiddle.net/4fu5S/2/ 这是附加方法的JS: $.validator.addMethod( “regexdoc”, function (value, element) { return this.optional(element) || !(/:|\^|\[|\]|\?|&|#|\\|\*|\’|\”||\||%/g.test(value)); }, “Document Names Cannot Contain Characters /, :, ?, \\, *, |, [, ], .”); 这是validation的JS: $(“#frmUpload”) .validate({ debug: true, errorPlacement: function (error, element) { element.closest(‘.control-group’) .find(‘.help-block’) .html(error.text()); }, highlight: function (element, errorClass, […]

使用bootstrap popover在其中显示结果

这是从开放天气API获取伦敦温度的代码。 它工作正常 <!– function foo(callback) { $.ajax({ url: "http://api.openweathermap.org/data/2.5/weather?q=London", dataType: 'JSON', success: callback }); } function myCallback(result) { var temp = JSON.stringify(JSON.parse(result.main.temp)); var Kelvin = 272; var Centigrade = Math.round(temp-Kelvin); if (Centigrade <= 25) { //alert("Temperature : "+Math.round(Centigrade)+" C"); var temp = document.getElementById("temp"); temp.style.fontSize = "20px"; temp.innerHTML = Centigrade+"° C , Cool   "+"”; //document.getElementById(“temp”).innerHTML = Centigrade+”° […]

将Bootstrap选项卡链接到服务器URL

看起来已经有很多讨论,但我无法让我的代码工作。 我有一个Django项目和带有Bootstrap tab药片的模板。 我试图将标签菜单药片绑定到我的Django项目的url。 我只是无法读取Uncaught Error: Syntax error, unrecognized expression: /employee_user_info/40/客户端错误。 这是我的代码: HTML: {{person_details_form.second_nm_rus.value}} {{person_details_form.first_nm_rus.value}} {{person_details_form.middle_nm_rus.value}} Tab 1 Tab 2 Tab 3 Django urlconf url(r’^employee_user_info/(?P\d+)/$’,employee_views.profile_user_info, name =’employee_user_info’), JS var navpills = $(‘.nav-pills’); $(function () { // activate tab on click navpills.on(‘click’, ‘a’, function (e) { var $this = $(this); // prevent the Default behavior e.preventDefault(); […]

如果从高级搜索对话框中删除行,如何清除工具栏中的filter值

如果从高级searxh对话框中删除它们,则自由jqgrid不会清除filter工具栏中的值。 要重现,请打开高级searcg对话框 http://www.ok-soft-gmbh.com/jqGrid/OK/formEditOnDoubleClick-jqueryui-fa-bootstrap.htm 通过单击减号按钮删除这两个条件按下查找按钮后,搜索工具栏仍然包含这些值。 怎么解决这个问题?

单击所选容器时,在模态体中滚动并设置div

我在模态中有一个表单,我用选择的jquery格式化我的选择框 当我点击选定的容器时,我想将div滚动到模态体的顶部 我的表格在这里 当点击选择的容器时,我想通过jquery这种类型的滚动 我试着这样做: //$(document).on(‘click’,’.search-field’,function(){ $(document).on(‘click’,’.chosen-choices’,function(){ console.log(“ok”); // $(this).animate({scrollTop: $(this).closest(‘.modal-body’).offset().top},’slow’); // $(‘body’).animate({scrollTop: $(this).closest(‘.modal-body’).offset().top},’slow’); $(‘.modal-body’).animate({scrollTop: $(this).closest(‘.modal-body’).offset().top},’slow’); // $(this).closest(‘.chosen-container’).animate({scrollTop: $(this).closest(‘.modal-body’).offset().top},’slow’); // $(this).scrollTop(0); }); 如果我点击项目经理选择框,那么它应该固定在顶部,如果我点击转包商,那么它应该固定在顶部。 请帮我这样做。

什么可能导致Bootstrap模式不留在屏幕上?

我在我的应用程序中使用Bootstrap模式,我正在尝试执行股票Bootstrap模式作为概念certificate(即从模态工作的基线开始,然后从那里构建)。 在我的_notifications.html.erb我有这个: Launch demo modal ×Close Modal title … Close Save changes 问题是当我点击它时,模态出现的时间为1/10秒,然后消失。 这就是我的application.js样子: //= require jquery //= require jquery_ujs //= require jquery.turbolinks //= require best_in_place //= require main.js //= require bootstrap //= require bootstrap-sprockets //= require jquery-ui/datepicker //= require best_in_place.jquery-ui //= require jquery.purr //= require best_in_place.purr //= require bootstrap.file-input //= require chosen.jquery //= require […]