0

我创建了一个正常的

= simple_form_for @nacform, :html => { :multipart => true } do |f|


  = f.error_notification

  .row
    .span12
      %h4 Form Details
      %hr
  .row
    .span3
      .field
        = f.input :Title
      .field
        = f.input :Description
      .field
        = f.label :asset, "File"
        = f.file_field :asset
  .form-actions

    = link_to 'Back', nacforms_path, :class => 'btn btn-small btn-primary'
    %a#modal_btn.btn.btn-success.btn-small{:href => "#modal"} Continue

和模态

#modal.modal.hide
    .about
      .modal-header
        %button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} ×
        %h2 Forms
    = simple_form_for @nacform, :html => { :multipart => true } do |f|
      = f.button :submit, "Upload Form", :class => 'btn btn-success'

:javascript
    $("#modal_btn").click(function(){
      $('#modal').modal();
    });

表单的提交按钮在模式上,但是当我单击该提交按钮时没有任何反应,我做错了吗?

4

1 回答 1

0

为了使用 jQueryshow方法或从它派生的东西出现,您通常指定一个易于覆盖的内联样式:

#modal.modal{ :style => 'display:none' }

拥有一个.hideCSS 类可能是导致它保持隐藏的原因。

于 2013-06-28T03:17:30.167 回答