Created
January 7, 2015 18:19
-
-
Save meaganewaller/7f8f62cce8631f03cf74 to your computer and use it in GitHub Desktop.
bootstrap modal not working :(
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="modal-header"> | |
<!-- modal body & stuff goes here --> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def modal_action | |
respond_to do |format| | |
format.html | |
format.js | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= link_to "My Modal", modal_action_path, remote: true, 'data-target' => "#modal-window" %> | |
<!-- hidden div for modal --> | |
<div id="modal-window" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#modal-window").html("<%= j render("modal_action") %>"); | |
$("#modal-window").modal('show'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't see a
<div class="modal-dialog">
or a<div class="modal-content">
anywhere in your HTML. Could that be the problem?Which bootstrap version do you use?