Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ModalShow(){
- // When the user checks the checkbox...
- localStorage.setItem('checkbox', 'true');
- // When a user visits the page...
- var checkbox = localStorage.getItem('checkbox');
- if ('checkbox'.checked == 'true') {
- $('#myModal').modal('hide')
- } else {
- $('#myModal').modal('show')
- }
- }
- // html
- <div class="modal-footer">
- <p>usual terms and conditions acceptance blah.</p><input id="checkbox" type="checkbox" class="agreement" required>
- <input type="submit" class="modal-button btn" data-dismiss="modal" value="Submit">
- </div>
- </div>
Add Comment
Please, Sign In to add comment