how to get dynamically created elements width and apply style to that?
<p>I am creating an <code>li</code> element dynamically like this:</p>

<pre><code>$(data).find('slide').each(function(numSlide){
  var slideLink = $(this).attr('link');
  var slideimage = $(this).children('slideimage').text();
  var slidedesc = $(this).children('slidedesc').text();

  $('.slider ul').append('&lt;li&gt;&lt;a href="'+slideLink+'"&gt;&lt;img src="'+root+"images/top-slider-image/"+slideimage+'" alt="welcome to Burger Davis Blog" /&gt;&lt;/a&gt;&lt;div class="note"&gt;'+slidedesc+'&lt;/div&gt;&lt;/li&gt;');
})
</code></pre>

<p>But I'd like to calculate the width of the <code>li</code>, and I need to apply some style to it -- how can I do that? If I add styles via the <code>css</code> method, it does not work for dynamically created elements...</p>

<p>Please help me to get dynamic elements' width and how to apply styles into that?</p>

<p>I know we can use the <code>live</code> function, but I can't get even by that..</p>
