javascript - uncaught typeerror: cannot read property cookie of undefined -
first of want i've searched across internet , not find answer anywhere.
i've tried use jquery-coockie.js wordpress template, i've created own page kind of calculator.
when i'm trying excecute
if ($.cookie('cart')){
it gives me error :
uncaught typeerror: cannot read property cookie of undefined
i've included jquery-cookie.js correctly, not-including not giving me problem.
the error you've pasted indicates jquery not defined. did include earlier in page?
in other locations on page, refer jquery calling jquery(...)
, seems do have it, it's stored different variable.
if you're controlling line fails (if it's not part of external cookie script), use jquery.cookie(...)
instead.
if don't control script adding jquery page, instead alias $ -- $ = jquery;
Comments
Post a Comment