Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p>This is the content of the page</p>
- <div id="modal" class="modal">
- <div class="warning">
- <div>
- <span class="exit">×</span>
- <a href="https://www.google.com">Google</a>
- </div>
- <a href="https://www.google.com/random">Some SharePoint URL</a>
- </div>
- </div>
- .modal {
- display: block;
- position: fixed;
- left: 0;
- top: 0;
- padding-top: 20px;
- z-index: 1;
- width: 100%;
- height: 100%;
- background-color: grey;
- background-color: rgba(0, 0, 0, 0.5);
- }
- .warning {
- background-color: #fefefe;
- margin: auto;
- padding: 20px;
- border: 1px solid #888;
- width: 80%;
- }
- .exit {
- color: #aaaaaa;
- float: right;
- font-size: 28px;
- font-weight: bold;
- cursor: pointer;
- }
- var modal = document.getElementById('modal');
- var span = document.getElementsByClassName("exit")[0];
- span.onclick = function() {
- modal.style.display = "none";
- }
Add Comment
Please, Sign In to add comment