I am new to jQuery. I am working on some cookies script which my cookieA (name of cookie) is null (contains nothing).
When a button is clicked, this script will add 10 to the value of cookieA. And when I click the button again, the value 10 will become 20 and so on.
Here's the script :
$('.button').click(function(){ $.cookie(cookieA, parseInt($.cookie(cookieA).val(),10) +10 , cookieOptions); }); Please help me, this is making the value turn into NaN or null .
Thanks and have a wonderful day.
p/s I'm using the script from Klaus Hartly the author of jQuery cookies.
p/s Cookieopstions is the settings for the cookies expiry date etc.