Skip to content

Instantly share code, notes, and snippets.

@Fobiya
Last active December 21, 2018 10:51
Show Gist options
  • Save Fobiya/173e15b5f08f3506cf9cdbd09da5f12f to your computer and use it in GitHub Desktop.
Save Fobiya/173e15b5f08f3506cf9cdbd09da5f12f to your computer and use it in GitHub Desktop.
_COOKIE
@Fobiya
Copy link
Author

Fobiya commented Nov 27, 2018

jQuery.cookie=function(e,i,o){if("undefined"==typeof i){var n=null;if(document.cookie&&""!=document.cookie)for(var r=document.cookie.split(";"),t=0;t<r.length;t++){var p=jQuery.trim(r[t]);if(p.substring(0,e.length+1)==e+"="){n=decodeURIComponent(p.substring(e.length+1));break}}return n}o=o||{},null===i&&(i="",o.expires=-1);var u="";if(o.expires&&("number"==typeof o.expires||o.expires.toUTCString)){var s;"number"==typeof o.expires?(s=new Date,s.setTime(s.getTime()+24o.expires60601e3)):s=o.expires,u="; expires="+s.toUTCString()}var a=o.path?"; path="+o.path:"",c=o.domain?"; domain="+o.domain:"",m=o.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(i),u,a,c,m].join("")};

@Fobiya
Copy link
Author

Fobiya commented Dec 21, 2018

<script> jQuery(function($) { $('.botton').click(function(e){ document.getElementById('gdpr-modal-container').remove(); $.cookie("Cookie__Policy","0",{expires:0}); }); }); </script>
    <div class="avada-row box__alert">

        <div class="box__cocke" id="gdpr-modal-container">
            <p>Um die Webseite optimal gestalten und fortlaufend verbessern zu können, verwenden wir so genannte Cookies. Durch die weitere Nutzung der Webseite stimmen Sie der Verwendung von Cookies zu. <span>Weitere Informationen finden Sie in unseren Datenschutzbestimmungen.</span>
                </p>

                <a href="//www.mobexo.de/impressum" target="_blank" class="botton telefonnummer">OK</a>
        </div>

    </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment