title: width() returning `null` on a DOM object
body: <p>I have the following object</p>
  
  <pre><code>&lt;div class='app_advert'&gt;&lt;a href="/apps"&gt;GET THE APPS&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  <p>whicch I'll refer to as <code>x</code> I am trying to position automatically above a another element (<code>y</code>), I want to line up the middle of the objects, so my theory goes thus:</p>
  
  <pre><code>x_width = $(x).width();
  y_width = $(y).width();
  y_position = $(y).offset().left;
  
  x_horizontal_position =  y_position+(y_width/2)-(x_width/2)
  </code></pre>
  
  <p>I am trying to fetch the width of <code>x</code> using:</p>
  
  <pre><code>jQuery(window).load(function(){
      object_width = jQuery('.apps_advert').width();
      console.log(object_width);
  });
  </code></pre>
  
  <p>but it is returning <code>null</code>.</p>
  
  <p>I am also applying the following CSS, in case this may affect things:</p>
  
  <pre><code>    div.app_advert{
      position: absolute;
      display: none;
  
      font-size: 17pt;
      top: 0;
  
  }
  div.app_advert a{
      color: white;
      text-decoration: none;
  }
  </code></pre>