Cookie based popup/Modal for first time visitors only

Post Reply
User avatar
Site Admin
Posts: 33
Joined: Sat Aug 01, 2015 8:44 pm

Cookie based popup/Modal for first time visitors only

Post by hiccup » Thu Feb 21, 2019 4:37 pm

Code: html Select all

<div class="container">
  <!-- Trigger the modal with a button -->
  <button type="button" class="btn btn-info hidden btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button>

  <!-- Modal -->
  <div class="modal fade" id="myModal" role="dialog" data-keyboard="false" data-backdrop="static">
    <div class="modal-dialog">
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close hidden" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Terms</h4>
        <div class="modal-body">
          <img style="max-width: 200px; margin: 0 auto" src="/images/logo.png" alt="" class="img-responsive text-center">
          <p> was established to help people discuss matters pertaining to the Cannabis Vape 
Cartridge Community</p>
          <p>Including Terpenes, Preferred Cartridges, Custom Recipes, and Favorite Brands - Please respect each other and keep it civil.</p>
          <p>By entering (A DabJuice Inc Company), you agree to the following:</p>
            <li>You are over the Age of 18.</li>
            <li>Cannabis Related Discussions are permitted in your territory.</li>
            <li>Harassment, Racial Slurs, Threats, Solicitation of illegal activity, Blackmailing, or Stalking will result in 
a permanent ban.</li>
          <p><strong>Please note: </strong></p>
          <p>Your Information is Most important to us, and we will NEVER Sell your information EVER.</p>
        <div class="modal-footer">
          <button id="agreed" type="button" class="btn btn-default" data-dismiss="modal">Agree</button>

<!-- jQuery and bootstrap js and css are required -->
<script src=""></script>
<script type="text/javascript">
    setTimeout(function() {
    }, 1000);

  $("#agreed").click(function () {
      Cookies.set('hide-div', true, { expires: 365 });

Post Reply