Cookie plugin is included and all is working fine on first click, but when i try to click on another link with different data-id i have this error $.cookie is not a function, like that cookie can not be updated with new value
$(document).ready(function(){
$('#row').live('click',function(){
var msg_id = $(this).data('id');
$('#table_2').html('Loading...');
$.cookie("chat_", msg_id, { expires: 1 });
$('#table_2').load('http://google.com/mail_ajax.php?id='+msg_id,function(){
$("#table_2").html();
});
});
var chat_d = $.cookie('chat_');
var timeout = setInterval(reloadChat, 3000);
function reloadChat () {
$('#table_2').load('http://google.com/mail2ajax.php?id='+chat_d);
}
});
why i can't update cookie on 2nd click, and where can be problem ?