$.cookie is not a function

在调试网站的时候,用jquery获取cookie时,报错:

$.cookie is not a function;

一般情况$.cookie is not a function;错误原因: 

一、没有引入jQuery库文件(解决方法:网上查找jquery.cookie.js文件并引用)

二、jQuery库文件和jquery.cookie.js文件的顺序问题。须先引入jQuery库文件再引入cookie插件文件

三、一个页面由于二次或多次引入了jquery插件导致。

本文摘自木庄网络博客>>$.cookie is not a function

posted @ 2016-11-22 10:28  木庄  阅读(10351)  评论(0编辑  收藏  举报