When I try to load my page that uses jquery, when the following line is hit:
if ($.cookie('compare') != null)
I get the error $.cookie is not a function. Has anybody seen this before?
When I try to load my page that uses jquery, when the following line is hit:
if ($.cookie('compare') != null)
I get the error $.cookie is not a function. Has anybody seen this before?
That means that the $.cookie
plugin isn't being included in the page, at least not being it's getting called. Make sure it's both being included, and is being included before it's getting used. Include it just after jQuery itself to be safe.
Just a tip: Several other plugins rely on the cookie plugin (but don't necessarily check if it exists before calling it), you could be using one.