I have this bit of code where I try to set a cookie using jQuery before redirecting to another page:
$(document).ready(function() {
$("#offers-categories").click(function () {
$.cookie("cardType", "1");
window.location = "categories.html";
});
});
This is the error that I get in the Console when I click the #offers-categories
div:
Uncaught TypeError: Object function (e,t){return new st.fn.init(e,t,X)} has no method 'cookie'
What I am doing wrong here?