I had asked this earlier but unfortunately I am still stuck. I have a link_to like this
<%= link_to "Click Here", page_path,, :id => 'login', "data-toggle" => "modal" %>
in page.html.erb (the page which I want to load in modal when the link gets clicked),I have
<div class="modal" id="loginModal">
Test Content
</div>
in assets/page.js.coffee
$('#loginModal').modal(options)
but still, the link is not opening in a modal Any help ?
Add data-target
<%= link_to "Click Here", page_path, :id => 'login', "data-toggle" => "modal", 'data-target' => '#loginModal' %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With