By liliplanet on
Hi! Probably not super smart here 😅, but please how do I open a modal from a link and not a button?
This is the button code from https://getbootstrap.com/docs/4.0/components/modal/, but just want a text link to open the modal (not a button).
Example: <a href="...">open the modal</a>
<p><button class="btn btn-primary" data-target=".bd-example-modal-lg" data-toggle="modal" type="button">Large modal</button></p>
<div aria-hidden="true" aria-labelledby="myLargeModalLabel" class="modal fade bd-example-modal-lg" role="dialog" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">description</div>
</div>
</div>
Most appreciate any guidance 😁
Comments
If you will add the 'id'
If you add the 'id' attribute, then you can create the link like this:
As always, you are so
As always, you are so fabulous @wombatbuddy ✨ only now starting the new build, so you know there is a plan coming soon 😉
The second way is just to use
The second way is just to use the 'btn-link' class instead of the 'btn-primary':
See https://www.w3schools.com/bootstrap4/bootstrap_buttons.asp
Oh absolutely perfect
Oh absolutely perfect @wombatbuddy! Thank you 🌷