Jump to content
MARCELO

Modal box with link

Recommended Posts

Sorry. For what i understood, i should do this right?

 

<a href="myModal">Open my Modal</a>

 

If so, its not working. What s wrong?

Share this post


Link to post
Share on other sites
On 6/10/2018 at 11:19 PM, dsonesuk said:

Just give the anchor link the same id.

IS 'href'  the new 'id' now? I know new trends change often, but somehow using 'href' instead of 'id' just isn't going to be practical in my opinion.

Edited by dsonesuk

Share this post


Link to post
Share on other sites

You are missing the # symbol in ahead of the id name followed by the data-toggle attribute.

it should be <a href="#myModal" data-toggle="modal>Your Link Text Here</a>.

data-toggle="modal" opens the modal window.

data-target or href="#myModal" points to the id of the modal i.e. the id of the parent <div> of the model.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×