Reputation: 1062
I have a big problem, jQuery cookies not working in all browsers.. And I'm using latest jQuery library version 1.4.4
Please help me
Edit:
var mid = $.cookie('mid');
if (mid == '1') {
$('#something').css('background', '#d3d3d3');
}
Upvotes: 1
Views: 22091
Reputation: 1491
First you need to confirm the html page is in server like localhost or hosted in any server. If you try to implement in index.html in general local directory in your pc, it will not work. Thanks
Upvotes: 2
Reputation: 138017
Some ideas:
Upvotes: 6
Reputation: 91
I had the Same Problem and the solution was too simple, I was loading jquery.cookie.js before I was loading jquery. As soon as I rearranged the script inclusions the problem went away.
script type="text/javascript" SRC="javascript/jquery-1.5.1.min.js"></script>
script type="text/javascript" SRC="javascript/jquery-ui-1.8.10.custom.min.js"></script>
script type="text/javascript" SRC="javascript/jquery.cookie.js"></script>
script>
Upvotes: 9