Changeset 2002098
- Timestamp:
- 12/27/2018 06:46:23 AM (7 years ago)
- Location:
- mega-ad/trunk
- Files:
-
- 2 edited
-
assets/js/min/mega-ad-cookie-min.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mega-ad/trunk/assets/js/min/mega-ad-cookie-min.js
r1101718 r2002098 1 jQuery(document).ready(function(){jQuery.cookie("mega-ad")?jQuery("#mega_ad_wrap").hide():(jQuery("#mega_ad_wrap").fadeIn(0),jQuery("body").addClass("has-message"),jQuery("html, body").css({overflow:"hidden",height:"100%"})),jQuery("#dismiss").click(function(){jQuery.cookie("mega-ad",1,{path:"/",expires:1}),jQuery("#mega_ad_wrap").hide(),jQuery("body").css({overflow:"scroll",height:"100%"})}),jQuery("#mega_ad").click(function(){jQuery.cookie("mega-ad",1,{path:"/",expires:1}),jQuery("#mega_ad_wrap").hide()}),jQuery("body").hasClass("login")&&jQuery("#mega_ad_wrap").hide()}); 1 /* 2 * jQuery Cookie for Mega Ad With jQuery Cookie 3 * Author: Simon Web Design, LLC 4 */ 5 6 jQuery(document).ready( function() { 7 8 if ( ! jQuery.cookie( 'mega-ad' ) ) { 9 10 /* Cookie Not Detected Show Mega Ad */ 11 jQuery( '#mega_ad_wrap' ).fadeIn(0); 12 jQuery( 'body' ).addClass( 'has-message' ); 13 14 /* Mega Ad CSS Scroll Fix */ 15 jQuery( 'html, body' ).css({ 16 'overflow': 'hidden', 17 'overflow-x': 'hidden', 18 'height': '100%' 19 }); 20 21 } else { 22 23 /* Cookie Detected Hide Mega Ad */ 24 jQuery( '#mega_ad_wrap' ).hide(); 25 26 } 27 28 /* User Clicks Dismiss Mega Ad Drops Cookie */ 29 jQuery( '#dismiss','#mega_ad_wrap', '#mega_ad' ).click(function() { 30 31 jQuery.cookie( "mega-ad", 1, { path: '/', expires : 1 }); 32 jQuery( '#mega_ad_wrap' ).hide(); 33 34 /* Mega Ad CSS Scroll Reset */ 35 jQuery( 'html, body' ).css({ 36 'overflow': 'scroll', 37 'overflow-x': 'scroll', 38 'height': '100%' 39 }); 40 41 }); 42 43 /* User Clicks Mega Ad and Drops Cookie */ 44 jQuery( "#mega_ad" ).click(function() { 45 46 jQuery.cookie( "mega-ad", 1, { path: '/', expires : 1 } ); 47 jQuery( '#mega_ad_wrap' ).hide(); 48 49 /* Mega Ad CSS Scroll Reset */ 50 jQuery( 'html, body' ).css({ 51 'overflow': 'scroll', 52 'overflow-x': 'scroll', 53 'height': '100%' 54 }); 55 56 }); 57 58 /* If On Login Page Hide Mega Ad */ 59 if ( jQuery('body').hasClass('login') ) { 60 jQuery('#mega_ad_wrap').hide(); 61 } 62 63 }); -
mega-ad/trunk/readme.txt
r2002097 r2002098 4 4 Tags: fullscreen, ad, expiration 5 5 Requires at least: 3.0.1 6 Tested up to: 56 Tested up to: 4.1.1 7 7 Stable tag: 1.0 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.