title: simple jquery css margin not working
body: <p>Just a very simple issue but I'm very new to JavaScript.I'm trying to add a <code>margin-top</code> property to a <code>div</code> using JS on both <code>document.ready</code> and <code>window.resize</code>, but no luck.</p>
  
  <pre><code>function cent() {
      var blockheight = $("#block").height();
      var margintop = (blockheight / -2);
      $block.css("margin-top", margintop);                   
  };
  
  $(document).noConflict();
  $(document).ready(cent);
  $(window).resize(cent);
  </code></pre>