문제

Is jquery.cookie.js compatible with jquery-1.10.1 version? I get the following error:

Object function (e,t){return new x.fn.init(e,t,r)} has no method 'cookie'

Though I checked the below links -

$.cookie is not a function

Error: $.cookie is not a function

jQuery $.cookie is not a function

none helped to solve the issue. Is there any site from where I will get details about jquery.cookie.js compatibility with JQuery versions? Appreciate suggestions.Thanks in advance.

도움이 되었습니까?

해결책

Works fine for me with the latest version of $.cookie + jQuery 1.10.1:

$.cookie('foo', true);
console.log($.cookie('foo'));

http://jsfiddle.net/h2xHP/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top