javascript - Modal popup with cookie.js -


so trying implement modal popup on homepage displays on first page visit , expires after set amount of time. using cookie.js , have jsfiddle (here:https://jsfiddle.net/yalsdahk/68/) works perfection. however, when try copy code on homepage, doesn't seem work. can offer assistance?

here's html markup , script:

<div id="init-modal-wrapper"> <div class="opening-modal-title"> little heads up... </div> <div class="close_box_6"> <div class="icon-font-25 alignment" data-icon="&#xe0ab"></div> </div>   <div id="horizontal_bar" class="alignment"> </div>  <div id="popupfoot" class="alignment">  <div id="typeface" class="init-modal-text">stuff!</div> </div>  </div>    <div class="init-modal-overlay"></div> 

$(document).ready(function() {  if ($.cookie('init_modal_1') == null) {     $.cookie('init_modal_1', 'yes', { expires: 1, path: '/' }); var delay=4000; settimeout(function(){ $("#init-modal-wrapper").stop().animate({         height: "toggle",         opacity: "toggle"     }, "slow"); $('.init-modal-overlay').fadein("slow",function(){});  }, delay);  };  });  


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -