title: Accessing selection direction on an input element error
body: <p>I'm trying to save the Javascript Array object in a cookie. But as it didn't work properly, I found the stringify() function in json.js file. Following is my code:</p>
  
  <pre><code>$(".save").on('click', function(){          
  var lhb = [], csb = [], cons = [], vb = [],
        txt = $("#accordion").find('textarea').serialize(),
        lbs = $('.lh:checked').each(function(){ lhb.push($(this).val()); }),
       cbs = $(".cs:checked").each(function(){ csb.push($(this).val()); }),
       cs = $(".cons:checked").each(function(){ cons.push($(this).val()); });
       vs = $(".vul:checked").each(function() { vb.push($(this).val()); });
       scenario = { 
          "textArea" : txt
          "lbs" : lbs,
          "cbs" : cbs, 
          "cs" : cs,
          "vs" : vs
      },
      cardId = $(this).parent().get(0).id;
      save(cardId, scenario);
      retreive(cardId);
  });
  </code></pre>
  
  <p>Now in the <code>save</code> function I convert the scenario into JSON object using json.js</p>
  
  <pre><code>function save(cardId, formData){
      $.cookie(cardId, JSON.stringify(formData), { expires: 7, path: '/' });
  }
  </code></pre>
  
  <p>And this give me the following error:</p>
  
  <p><code>Accessing selection direction on an input element that cannot have a selection.</code></p>
  
  <p>Can anyone help me fix this error. Is that my approach is correct about saving the json array in to the cookie?</p>
  
  <p>Thanks</p>