Tag: twitter bootstrap

如何在Rails上提交模式表单后更新DOM

我正在使用Twitter Bootstrap尝试使用模态表单来处理我的注册过程。 我可以获取提交表单,关闭模式,一切正常,但DOM不会不引人注意地更新。 用户登录后,导航栏(使用部分呈现并具有ruby)不应再具有“注册”链接,并且应获取“注销”链接。 由于我无法在管理表单提交的coffeescript文件中使用render ,如何重新呈现导航栏以便反映成功注册/模式表单提交? 模态forms(HAML): = simple_form_for @user, remote: true, html: {data: {type: ‘html’}, class: ‘form-horizontal’} do |f| %div.modal-header %button.close{“aria-hidden” => “true”, “data-dismiss” => “modal”, :type => “button”} × – if @user.errors.any? #error_explanation %h2= “#{pluralize(@user.errors.count, “error”)} prohibited this user from being saved:” %ul – @user.errors.full_messages.each do |msg| %li= msg %div.modal-body =render ‘form’, f: […]

jQuery BootGrid – 隐藏列

使用BootGrid,您可以在列定义中使用data-visible =“false”隐藏列。 这会产生一个问题,即它不是仅仅隐藏列,而是将其从DOM中删除。 列 (前两个不显示) ID User Title Description Expire Commands 问题 ID和用户设置为data-visible =“False”,其值无法访问。 使用data-visible =“false”似乎使这些字段完全不存在。 我需要能够访问这些值。

Jasny Bootstrap改变了

我正在寻找我的管理模板的侧边栏,我想使用jasnybootstrap。 我的目标是调整内容的大小,不要翻译出屏幕。 类似的效果是http://startbootstrap.com/template-overviews/simple-sidebar/ 我希望有人可以告诉我是否有可能获得这样的结果。 Brand Home Link Link Jasny Bootstrap starter template Use this fiddle to demonstrate an issue with Jasny Bootstrap or to show an example using Jasny Bootstrap. http://jsfiddle.net/k9K5d/13/ 提前致谢

如何在Bootstrap datepicker中停用前一个日期?

我正在使用Bootstrap datepicker,我想要暂停之前的日期。 意味着用户不应该选择前一天。 我希望这能够开发用于安排一些用户工作的function。 我需要做什么?

如何使用jQuery更改bootstrap按钮样式

  按钮样式为http://getbootstrap.com/2.3.2/base-css.html#buttons 我想通过使用jQuery来改变诸如“btn-danger”或“btn-info”之类的风格……我认为需要删除样式并添加新的… 怎么做。 谢谢。

无法将DatePicker添加到模态 – 在背景中显示

我试图插入一个我在这里找到的DatePicker: http : //www.eyecon.ro/bootstrap-datepicker/但我不能让它显示在我的模态前面。 (我可以在模态的背景下看到它) 我不确定我是否错误地实现了它,或者我是否需要将它安装在模态显示的顶部。 这是我的Bundle.config,其中我添加了bootstrap-datapicker.js和bootstrap-datapicker.js文件。 public class BundleConfig { // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle(“~/bundles/jquery”).Include( “~/Scripts/jquery-{version}.js”)); bundles.Add(new ScriptBundle(“~/bundles/jqueryval”).Include( “~/Scripts/jquery.validate*”)); // Use the development version of Modernizr to develop with and learn from. Then, when you’re // ready for production, use the build tool […]

使用Rails通过Ajax添加Twitter Bootstrap Popover

我正在尝试通过带有rails的ajax调用添加一个popover。 我在firebug中看到内容加载正常,但弹出窗口没有加载。 所有其他弹出窗口都在页面上工作,如果我重新加载页面,弹出窗口也可以工作……但它只是在ajax调用上不起作用。 我错过了什么? update.js $(“#new-pins”).append(“<img src='https://stackoverflow.com/images/.png’ class=’pinimage’ data-content=’hello’ data-original-title=”>”) show.html popover javascript: $(function () { $(‘.pinimage’).popover({ html : true }); }); 这是在ajax调用之后加载的内容: 感谢您的任何帮助!

在数据表中的可编辑字段中使用Tab键

现在我有一个数据表,有些字段是可编辑的,有些则不是。 我有以下代码(取自表格中可编辑字段之间的标签 ): $(‘#table .select’).bind(‘keydown’, function(evt) { if(evt.keyCode==9) { console.log(“next”); var nextBox=”; var currentBoxIndex=$(“#table .select”).index(this); console.log(“currentBoxIndex”,currentBoxIndex); if (currentBoxIndex == ($(“#table .select”).length-1)) { nextBox=$(“#table .select:first”); //last box, go to first console.log(“nextBox”, nextBox); } else { nextBox=$(“#table .select”).eq(currentBoxIndex+1); //Next box in line console.log(“nextBox”, nextBox); } $(this).find(“#table .select”).blur(); $(nextBox).click(); //Go to assigned next box return false; //Suppress normal […]

使用搜索按钮创建响应式导航栏

我正在尝试使用bootstrap创建一个响应式导航栏。 我想建立像http://wordpress.org/support/topic/want-to-move-search-option-from-header-to-navigation-bar 。 。 但搜索按钮不会向右移动,折叠时标签会分开并移动到下面的一行。 在下载Wordpress按钮的地方我想要LogIn和SignUp按钮。 折叠品牌名称时,搜索按钮和打开菜单的栏应显示在同一行中。 有人可以告诉你怎么做吗? 看我的代码 Brand Name Home Highlights Test Yourself Interesting Questions Ask Queries SignUp LogIn .navbar { min-height: 120px; } .navbar .container { padding-top: 20px; padding-bottom: 20px; } .navbar-nav>li>a { text-transform: uppercase; font-family: “jokerman”; font-size: 16px; } @media (min-width: 768px) { .navbar-nav { margin: 0 auto; display: table; table-layout: […]

bootstrap popover显示错误的元素

我试图点击一下使用bootstrap popover。 我首先在我的js onReady开始时初衷。 然后我添加一个show选项,但它将它附加到错误的dom元素。 它应该放在包装元素中。 var wrapper = $(“.modal .modal-wrapper”); wrapper.popover({trigger:’manual’, title:”WORKING TOOLTIP”, selector:wrapper}); 然后单击一个按钮调用它。 var showTooltip = function( ){ wrapper.popover(‘show’); } 问题是popover没有在包装器div中显示它在body元素中的显示。 如何让它显示在包装元素内部。