title: jQuery update cookie value
body: <p>I am using jquery-cookie library to create cookie with JQuery. How can I update value of the cookie? I need it create new cookie and if the cookie exists to update it. How can I do this?
  Code that I got:</p>
  
  <pre><code>v.on('click', function(){
        var d = $(this).attr('role');       
        if(d == 'yes')
            {
             glas = 'koristan.'   
            }else {
                glas = 'nekoristan.'
            };
         text = 'Ovaj komentar vam je bio ' + glas;
  
         //This part here create cookie
         if(id_u == 0){
             $.cookie('010', id + '-' + d);
         }        
        $.post('&lt;?php echo base_url() ?&gt;rating/rat_counter', {id : id, vote : d, id_u : id_u}, function(){
           c.fadeOut('fast').empty().append('&lt;p&gt;' + text).hide().fadeIn('fast'); 
        });
      })
  </code></pre>