Jquery show img title in span
<p>I want show the image title in a span tag, I use this code, but there has nothing show in the span tag.</p>

<pre><code>&lt;script type="text/javascript" src="jquery-1.4.2.min.js" &gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
jQuery(document).ready(function( {
$('#thumb ul li a img').fadeIn(function() {
        var $this = $(this);
        $this.next('.showtitle').append($this.attr('title'));
    });
});
&lt;/script&gt;
...
&lt;div class="thumb"  id="thumb"&gt;
&lt;ul class="ul"&gt;
&lt;?php
$result = mysql_query("SELECT * FROM ..."); 
$strstr=1; 
while ($row = mysql_fetch_array($result))
{
echo '&lt;li class="li"&gt;&lt;a href="' . $row['link']. '"&gt;&lt;img src="'.$row['image'].'" title="'.$row['title'].'" class="img'.$strstr.'" /&gt;&lt;/a&gt;&lt;span class="showtitle" /&gt;&lt;/li&gt;';
$strstr++;
}
?&gt;
&lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>I have checked, the title is not empty in the database. How to write correctly? Thanks.</p>
