Just want to share with you something that I use in one of my last works, that I think it could be important or interesting.
Lets say you want to create a link (url) to open a modal, normally you create a modal, create a button and add the function to open modal and you select the modal you want to open.
But lets say you want to share with someone a URL that open automatically a modal but only if you use that url, not open a modal automatically when you open one page or after some time, only with a URL.
With this code you can, so lets see an example:
If you have a modal lets call it #mobile you canât create a URL directly with:
But you can if you add the following code in the Footer of the page:
Just need to change #mobile with the modal ID you want to open.
So then if you share that URL that person will see the modal, it could be interesting for some discount, or some promotion, or for private information, well just my 2 cents, for some people that want to create links (urls) to open modals.