Sunday, 15 June 2014

javascript - cookie is not a function -


Cookie plugin is included and all are working fine on first click, but when I click on the other link with different data Trying to do this id $ .cookie is not a function, such as the cookie can not be updated with the new value

  $ (document) .ready (function () {$ ('# Row'). (Click on 'Work'), {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 = set Interval (reload, 3000); Reload function () {$ ('# table_2'). Load ('http://google.com/mail2ajax.php?id='+chat_d);}}};  

Why can not I update the cookie on second click, and where can the problem be?


No comments:

Post a Comment