javascript - jQuery - change .show to .slideUp on page load with a 3 second delay -
i have pop set cookie shows on page load. wish change .show .slideup 3 second delay after page load.
here's code:
<script> $(document).ready(function(){ // function show our popups function showpopup(whichpopup){ if (document.cookie.replace(/(?:(?:^|.*;\s*)dosomethingonlyonce\s*\=\s*([^;]*).*$)|^.*$/, "$1") !== "true") { $('.overlay-content').slideup( 300 ).delay( 800 ); //display popup background , set height page height document.cookie = "dosomethingonlyonce=true; expires=fri, 31 dec 9999 23:59:59 gmt"; console.log("cookie not found."); } } // function close our popups function closepopup(){ $('.overlay-content').hide(); //hide overlay } // hide popup when user clicks on close button $('.close-btn-new').click(function(){ closepopup(); }); showpopup(null); }); </script>
i'd :
window.settimeout(function() { $('.overlay-bg-lookbook').slidedown(); }, 3000); slideup hiding.
Comments
Post a Comment