Reputation: 161
I am looking for a way to open a modal as well as the underlying hyperlink. So if my code looks like this:
<a class="btn pull-right" target="_blank" href="http://www.example.com" data-toggle="modal" data-target="#modal_div" data-remote="false">something</a>
I want to open the Modal as well as the link to "www.example.com"... Does anybody have an idea of how to accomplish this?
Thanks for your advice!
Upvotes: 2
Views: 351
Reputation: 8715
You should define the .click
handler for your link, remove data-
attributes and toggle .modal()
with javascript.
I think that bootstrap handler for clicking on anchors with data-
attributes for modals and other plugins uses preventDefault()
, that is why you just can't use href="http://www.example.com"
.
Upvotes: 1