Skip to main content
Inspiring
July 23, 2019
Question

jquery.cookie.js not loaded in my CEP Panel

  • July 23, 2019
  • 2 replies
  • 1050 views

Hi,

I ma trying to store my panel setting using cookies and i try to load jquery.cookie.js.

for some reason all the other files are loaded but not jquery.cookie.js and i get an error that $.cookie is not a function.

why is it not loaded??

This topic has been closed for replies.

2 replies

karpiyonAuthor
Inspiring
July 24, 2019

Hi,

There were only 2 errors regarding fonts which were not loaded.

However when I test my cookie setting i get a few more errors:

I did not think it need a certain jquery version. I tried with jquery 1.4.2 and i still can't get it to work.

this is what i use to set my cookies

function setSessionCookies() {

var cookieList = ["etMockupScale", "folderName"];

for (i = 0; i < cookieList.length; i++) {

var myCookie = $("#" + cookieList).val();

alert("cookie name: " + cookieList + "\nvalue: " + myCookie);

$.cookie(cookieList, myCookie, { path: '/', expires: 365 });

}

}

karpiyonAuthor
Inspiring
July 24, 2019

I decided to use this instead:

JavaScript Cookies

Which was answered here:

Thomas_Szabo
Inspiring
July 23, 2019

Have you checked your console for errors? Also, does jquery.cookie work with jquery 3.2.1?