title: Javascript: Store function in localstorage
body: <p>Is this possible to insert to localstorage or is there other way to store this?</p>
  
  <pre><code>$('#pass_to_score').on('click',function(){
  
  var compressed = function(){
      $('.whole_wrap_of_editcriteria').css('display','none');
      $('#wrappler').css('display','block');
      $('#li_addcriteria').css('display','none');
      $('#li_menu1').addClass('active');
      $('#home').removeClass('active');
      $('#menu1').addClass('active');
      $('#title_panel').html('Edit criteria scoring');
  }
  compressed();
  localStorage.setItem('compressed', compressed());
  //i also try set as JSON.stringify but its undefined
  
  });
  </code></pre>