0

I have some code for logged in users. cookie is sent when the function is triggered by a click. Then, when the user log out, I want to clean this cookie. How to do this?

jQuery(document).ready( function() {
    var j = jQuery;
    j('a.logout').click( function() {
        // I want to clean the cookie that set below when user logout
    )};
    j("div.poll-panel a.flag").live('click',
        function() {
            my_get_loader().toggle();

            var doc = j(this).attr('id')
            doc = doc.split('-');

            j.post( Docs.url, {
                action: Docs.poll,
                'cookie': encodeURIComponent(document.cookie),
                'flag': doc[1],
                'doc_id': doc[2]
            },
            //other_functions here
    }
});
BenMorel
  • 31,815
  • 47
  • 169
  • 296
Jenny
  • 1,709
  • 4
  • 18
  • 35

0 Answers0