What is wrong in this function?
function getTuittingCookie() {
var tuitting_cookie = $.cookie("tuittingID");
$("#tuittingID").val(tuitting_cookie);
//alert(tuitting_cookie);
setTimeout(getTuittingCookie, 2000);
}
It should write the value every 2 seconds on the field:
<input id="tuittingID" style="display:none" value=""/>
But instead it does not write anything at all!
Can you help me please?
Are you calling function
getTuittingCookie()in your code .this code works for me see example at
http://jsfiddle.net/Z9dcb/2/
and in place of using code
you could use