title: JQuery: How to apply css to a .wrap element?
body: <p>My code thus far:</p>
  
  <pre><code>$(".lorem img:not(.full-img)").each(function() { 
      $(this).addClass("inline-img");
      var imgWidth = $(this).prop('width');
      var imgHeight = $(this).prop('height');
      var imgFloat = $(this).prop('float');
  
      $(this).wrap('&lt;div class="inline-img-wrap" /&gt;'); 
          if ($(this).prop("title")!='') {
              $('&lt;p class="inline-img-caption"&gt;').text($(this).prop('title')).insertAfter($(this)); 
          }
  });
  </code></pre>
  
  <p>I am searching for images within a body of text, appending their <code>title</code> values as captions underneath, and wrapping both <code>img</code> and <code>p</code> in a <code>div.inline-img-wrap</code>. That works fine.</p>
  
  <p>What I need help with is applying the styling of the <code>img</code> to the new wrapping div instead. You can see I have created vars for just this, but cannot get applying them to work. <code>$this</code> will always apply to the image, and <code>&lt;div class="inline-img-wrap" style="width:'+imgWidth+'"&gt;</code> doesn't work.</p>
  
  <p>All advice appreciated!</p>