Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/opulanceindia/js/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
/* * First Visit Popup jQuery Plugin version 1.2 * Chris Cook - chris@chris-cook.co.uk */ $(function () { $('#subscribe-me').firstVisitPopup({ cookieName : 'Batota2', showAgainSelector: '#show-message' }); }); function msg() { } function validatpopupemail() { var pattern1 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; if (!pattern1.test($('#email-popup').val())) { alert("Please Enter Valid Email"); return false; } else { $("#subscribe-me").modal('hide'); $('.main-banner').before('<div class="alert alert-success"><i class="fa fa-check-circle"></i>Subscription Success<button type="button" class="close" data-dismiss="alert">×</button></div>'); return false; } } (function ($) { 'use strict'; $.fn.firstVisitPopup = function (settings) { var $body = $('body'); var $dialog = $(this); var $blackout; var setCookie = function (name, value) { var date = new Date(), expires = 'expires='; date.setTime(date.getTime() + 1000 * 60 * 60 * 24 * 1); expires += date.toGMTString(); document.cookie = name + '=' + value + '; ' + expires + '; path=/'; } var getCookie = function (name) { var allCookies = document.cookie.split(';'), cookieCounter = 0, currentCookie = ''; for (cookieCounter = 0; cookieCounter < allCookies.length; cookieCounter++) { currentCookie = allCookies[cookieCounter]; while (currentCookie.charAt(0) === ' ') { currentCookie = currentCookie.substring(1, currentCookie.length); } if (currentCookie.indexOf(name + '=') === 0) { return currentCookie.substring(name.length + 1, currentCookie.length); } } return false; } var showMessage = function () { $blackout.show(); $dialog.show(); $("#subscribe-me").modal('show'); } var hideMessage = function () { $blackout.hide(); $dialog.hide(); $("#subscribe-me").modal('hide'); $("#success_msg").modal('hide'); setCookie('fvpp' + settings.cookieName, 'true'); } $( ".newsletter-popup" ).append('<a id="xout">X</a>'); $blackout = $('#fvpp-blackout'); if (getCookie('fvpp' + settings.cookieName)) { hideMessage(); } else { showMessage(); } $('#checkme:checkbox').change(function() { // this will contain a reference to the checkbox if (this.checked) { $body.on('click', '#email-popup-submit', hideMessage); } else { //$body.on('click', '#email-popup-submit', hideMessage); } }); $(settings.showAgainSelector).on('click', showMessage); $body.on('click', '#fvpp-blackout, #xout', hideMessage); }; })(jQuery);