title: Dynamically positioning elements using jQuery
body: <p>I am working om a menu bar, each menu bar item is an image, when user places mouse over menu item a div with submenu will appear.  </p>
  
  <p>I want to place div directly under the appropriate  image item (no space, and div will hover above all elements),  with right side alignment, meaning the right top corner of div should be under bottom right corner of image.  </p>
  
  <p>Because I can't and don't want to hard code position of divs, i want to do it dynamically.  </p>
  
  <p>For now I have this:</p>
  
  <pre><code>$('img').each(function(){                     
     jQuery(this).mouseenter(function(){
       var menuItem = $('#' + this.id + '_menu'); //get the needed div 
       var imgRight = this.offset() + this.width();
  
  
     });
   });
  </code></pre>