Advertisement
Guest User

Untitled

a guest
Mar 26th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. //Modal
  2. $(document).ready(function(e) {
  3. if ($(window).width() >= '768'){
  4. $('.js-mobile-download').click(function(e)
  5. {
  6.  
  7.  
  8. //Fade in delay for the background overlay (control timing here)
  9. $("#bkgOverlay").delay(4800).fadeIn(400);
  10. //Fade in delay for the popup (control timing here)
  11.  
  12. $("#delayedPopup").delay(5000).fadeIn(400);
  13. setTimeout(function() {
  14. $('#popupSlider').slick('slickGoTo', 1 );
  15. }, 4800);
  16. //Hide dialouge and background when the user clicks the close button
  17. $("#btnClose").click(function (e)
  18. {
  19. HideDialog();
  20. e.preventDefault();
  21. });
  22.  
  23. //Controls how the modal popup is closed with the close button
  24. function HideDialog()
  25. {
  26. $("#bkgOverlay").fadeOut(400);
  27. $("#delayedPopup").fadeOut(300);
  28. }
  29.  
  30. });
  31. }
  32. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement