So i am trying to open my modal when a password/username is entered wrong.
I have searched google but i can't come up with a good solution on how to do this with W3.CSS
.
My modal is being opened by an ID
called "id01"
and then i tried a small javascript that i found on stackoverflow in : Open modal with # in url.
After trying to edit it with the help of W3.CSS
to :
function popModal() {
modal.style.display = "block";
}
var hash = window.location.hash;
if (hash.substring(1) == 'id01') {
popModal();
}
It still didn't work. So to make a long story short. How do i make the modal go open when there is like : "#1234"
in the url?