jQuery Navigation/ Promotional Banner- Cookie

Following is the code for a  Promotional banner which is supposed to be seen on all the pages of the website.

The banner would have the following functionalities:

  1. It should be displayed above the header.
  2. It has a close button.
  3. If anyone closes the banner it should not be displayed again on any page for that user for next 12 hours

Following is the fiddle of the code with output:

https://jsfiddle.net/krina1810/3gtdunet/10/

 

$(window).load(function () {
  // if no cookie
  if (Cookies.get('nav') != "true") {
    $("#pop-up").show();
    $("#hide").click(function () {
      $("#pop-up").slideUp("slow");
      // set the cookie for 24 hours
      var date = new Date();
		
       date.setTime(date.getTime() + 12 * 60 * 60 * 1000);
      Cookies.set('nav', "true", {
       expires: date,
		  path: '/'
      });
				
    });
  }
	else {
		console.log("No Navigation Banner");
	}
});
	
	$(window).on('beforeunload', function(){
		console.log("Unloading");
	});

240 thoughts on “jQuery Navigation/ Promotional Banner- Cookie

  1. Pingback: Google
  2. Pingback: 토토사이트
  3. Pingback: 먹튀검증
  4. Pingback: 안전놀이터
  5. Pingback: female sex toys
  6. Pingback: Ulisse e Polifemo
  7. Pingback: anal dildo
  8. Pingback: ссылка
  9. Pingback: beast tv apk
  10. Pingback: long dildo
  11. Pingback: سکس چت
  12. Pingback: 메이저공원
  13. Pingback: 사다리사이트
  14. Pingback: 먹튀그램
  15. Pingback: cursos online
  16. Pingback: Google
  17. Pingback: teen porn
  18. Pingback: fbvcursos
  19. Pingback: Food coupons
  20. Pingback: kegel massager
  21. Pingback: Intervew
  22. Pingback: curved vibrator
  23. Pingback: FIFA 19 Coins
  24. Pingback: Chicago SEO
  25. Pingback: online earn money
  26. Pingback: detox tea
  27. Pingback: shmmovers.com
  28. Pingback: cursos gratuitos
  29. Pingback: wand massager
  30. Pingback: music theory
  31. Pingback: Pornhub
  32. Pingback: VIP Desert Safari
  33. Pingback: chwilówki
  34. Pingback: silver bullet egg
  35. Pingback: suction cup dildo
  36. Pingback: anal vibrator
  37. Pingback: Porn City XXX
  38. Pingback: milking toy
  39. Pingback: Nerf Gun
  40. Pingback: montagu terroir
  41. Pingback: findabride login
  42. Pingback: los angeles seo
  43. Pingback: xxnx
  44. Pingback: Free
  45. Pingback: anal butt plugs
  46. Pingback: 188bet
  47. Pingback: fun88
  48. Pingback: webcamsex
  49. Pingback: foxconn nt ibt18
  50. Pingback: asus q550lf manual
  51. Pingback: apps for pc
  52. Pingback: anal training
  53. Pingback: gay anal cleaning
  54. Pingback: best couples toys
  55. Pingback: hamptonbay
  56. Pingback: cursos gratuitos
  57. Pingback: gay sex
  58. Pingback: daniels fleshlight
  59. Pingback: dildo harness
  60. Pingback: cordless massager
  61. Pingback: filles coquin
  62. Pingback: webcambabes
  63. Pingback: the male p spot
  64. Pingback: butt plug
  65. Pingback: real cock
  66. Pingback: anal thruster
  67. Pingback: sex toy store
  68. Pingback: big dildo
  69. Pingback: pocket masturbator
  70. Pingback: room tour
  71. Pingback: penis vacuum pump
  72. Pingback: vaginal dildo
  73. Pingback: remote panties
  74. Pingback: anal cleaning bag
  75. Pingback: Porn
  76. Pingback: anal butt plugs
  77. Pingback: Tadapox
  78. Pingback: silicone butt plug
  79. Pingback: black dildo
  80. Pingback: erotic vibrator
  81. Pingback: panty vibrator
  82. Pingback: 15% minoxidil
  83. Pingback: Anabolic Steroids
  84. Pingback: satta matka
  85. Pingback: pocket pussy
  86. Pingback: best male stroker
  87. Pingback: 12 inches dong
  88. Pingback: vibrating stroker
  89. Pingback: anal plug kit
  90. Pingback: porn
  91. Pingback: penis ring
  92. Pingback: cyberskin stroker
  93. Pingback: oral sex
  94. Pingback: pocket stroker
  95. Pingback: EU
  96. Pingback: SSRU
  97. Pingback: realistic dong
  98. Pingback: leader bondage
  99. Pingback: best vibrator 2019
  100. Pingback: bullet vibrator
  101. Pingback: gips mallen
  102. Pingback: suction orgasm
  103. Pingback: 15% minoxidil
  104. Pingback: click now
  105. Pingback: Julia Ann Porn
  106. Pingback: bdjobs
  107. Pingback: Fashion Station
  108. Pingback: Fashion Station
  109. Pingback: Pool Pump
  110. Pingback: sexboer
  111. Pingback: porno files
  112. Pingback: geile sex filmpjes
  113. Pingback: gratis films
  114. Pingback: pornofilmpjes
  115. Pingback: iptv windows
  116. Pingback: liteblue
  117. Pingback: porn
  118. Pingback: finger vibe

Leave a Reply