title: Dropdown menu positioning with jquery
body: <p>I am trying to create a dropdown menu and i need to detect the corect position for the submenu. This is how i indent it with jquery:</p>
  
  <pre><code>function changeSubcat(catid){
      var position = $('#menuparent_'+catid).position();
      position.left = position.left - 180;
      $('#menu_'+catid).css("left", position.left);
  }
  </code></pre>
  
  <p>The real problem is that it works just for a window of the size i worked on, obviosly, so i need to optimize it to work on other dimensions. First i thought i should use another method than          <code>position()</code> , but i haven't found a better one. Sorry for not providing the html code but it is a little furry.</p>