html - Getting rid of href in modal implementation -
i using modal displaying information on site people do. modal using written in css(no jquery).when link clicked modal shows , url changes shown:
reminder.local/main.php#patient0
so, after modal window closed url becomes:
reminder.local/main.php#
the problem is, when button pressed goes reminder.local/main.php#patient0 expected , modal window pops again, highly undesirable.
any way around this..plzz let me know.
example code modal:
<a href="#text2" id="appoint">next</a> <div class="lightbox" id="text2"> <div class="box"> <a class="close" href="#">x</a> <p class="title">modal window text</p> <div class="content"> <form> <input type="text" >name <br> <input type="password">password <br><br> <input type="submit" value="submit"> </form> </div> </div> </div>
if don't want change url @ all, can change modal opens input
/label
so:
input { display: none; } .lightbox { display: none; border: solid 1px red; } input:checked ~ .lightbox { display: block; }
<input id="appoint" type="checkbox" /> <label for="appoint">next</label> <div class="lightbox" id="text2"> <div class="box"> <label for="appoint">x</label> <p class="title">modal window text</p> <div class="content"> <form> <input type="text">name <br> <input type="password">password <br> <br> <input type="submit" value="submit"> </form> </div> </div> </div>
Comments
Post a Comment