简体   繁体   中英

IE jQuery cookie issue

Why my cookie law script appears every time when i open my website ONLY on Internet Explorer or Microsoft Edge?

if I close the browser and reopen it, the cookie will be asked. Again and again on my web site.

this is my site: http://www.nepsrl.it/

this is my script: http://www.nepsrl.it/cookieinfo/cookieinfo/cookieinfo.js

I tried to fix the problem several times, but without success, I think it is a compatibility problem, someone has an idea?

This is already embedded in your script file.

Code for building the cookie banner html

var cookieInfoMain = '<div id="cookie-law-container-box"><div id="cookie-law-container"><div id="cookie-law-message">' + this.options.defaultText + '</div><div id="cookie-law-action" style="float:right;"><a class="cookie-law-button" id="cookie-law-button-ok" href="#">' + this.options.okButton + '</a>' + moreButton + '</div><div style="clear:both;"></div></div></div>';

Code where it is appended to the body

$("body").append('<div id="jquery-cookie-law-script" class="' + this.options.style +' ' + this.options.location + ' ' + position + '">'+ cookieInfoMore + cookieInfoMain + '</div>');

If you don't want the cookie information to be shown, then remove that code from appending to body.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM