trying to fix a bug where you have to click twice on the tutorial credentials button

This commit is contained in:
Ken Johnson
2013-06-20 11:28:29 -04:00
parent 2e052828a6
commit 1a79471ef8
+3 -2
View File
@@ -20,7 +20,7 @@
<% end %>
<ul class="mini-nav">
<li>
<%= button_to "Tutorial Credentials", "#", {:id => "show_creds_btn", :class => "btn btn-danger", :method => "get"} %>
<%= button_to "Tutorial Credentials", "#myModalLabel1", {:id => "show_creds_btn", :class => "btn btn-danger", :method => "get"} %>
</li>
</ul>
@@ -31,7 +31,8 @@
<script type="text/javascript">
$('#show_creds_btn').click(function() {
$('#show_creds_btn').click(function(event) {
event.preventDefault();
$("#modal_div").load(<%= credentials_tutorials_path.inspect.html_safe %>);
$("#modal_div").modal("show");
});