vlio20
vlio20

Reputation: 9295

$.cookie gives error

I have this message:

TypeError: Object function (a,b){return new p.fn.init(a,b,h)} has no method 'cookie'

after I have used this code:

$.cookie('login', returnedData.login); 
$.cookie('password',returnedData.password);  
alert($.cookie('login'));

I have included jQuery and all it's function works fine.

Some help with this please..

Upvotes: 0

Views: 462

Answers (1)

webdeveloper
webdeveloper

Reputation: 17288

$.cookie is not part of jQuery lib. Include jquery-cookie on your page and everything must work.

Upvotes: 4

Related Questions