I am using jQuery Cookie Plugin and its working fine on all pages except on home page for running that page I am banging my head but no luck.
My code looks like:
$.cookie('CA_txtKeywords', $("#CAT_txtKeywords").val(), { expires: 7, path: '/' });
In firebug It says:
Uncaught TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no method ‘cookie’
Can some one please guide what is this error and how to remove it?
You include jQuery in your head, then you include the cookie plugin, but then at the bottom of the page you have this:
Which loads jQuery AGAIN using the google loader. Because you load jQuery again, whatever was attached directly to the jQuery namespace (not the prototype) in the head of the document gets removed.
So it comes down to, why in the world are you loading jQuery twice?
Solution:
Remove the google loader and request for it to load jQuery from the footer of your home page.