0
.row
  .span12
    .front-heading{:style => "width:80%;margin: auto;border-bottom: 2px dotted grey;"} The most innovative fundraising program since thin, minty cookies.
    .modal#myModal.hide.fade
      .modal-header
        Requesting an installation
        = link_to "X", "#", :class => "close", "data-dismiss" => "modal"

    = form_tag request_installation_path,{:method => :post,:remote => true, :style => "margin-bottom:0;", :class => "form-horizontal"} do
      .modal-body
        #sent_message
        %fieldset
          .control-group
            = label_tag "Name", nil, :class => "control-label"
            .controls
                = text_field_tag "name", nil, :class => "span2"
            .control-group
              = label_tag "Email", nil, :class => "control-label"
              .controls
                = email_field_tag "email", nil, :class => "span2"

        .modal-footer
          = submit_tag "request", :class => "btn btn-success"#, "data-dismiss" => "modal"

    .sticky-banner{:style => "position:relative;"}
      %h3 Coaches and Administrators
      %span{:style => "position:absolute;top: 10px;right: 5px;"}
4

2 回答 2

1
$('#myModal').modal('toggle');

这将隐藏/显示模态窗口。说明在这里:http: //twitter.github.com/bootstrap/javascript.html#modals

于 2013-02-04T11:08:18.303 回答
0

如果这不起作用。使用以下,这应该工作。

$(".modal").css("visibility", "hidden");

也改变用途

$(".modal").css("visibility", "visible"); 
于 2013-02-04T10:17:42.483 回答