Adding li tags using javascript
<p>Hi I have a problem I have a code example code below:</p>

<pre><code>&lt;div class="fadein"&gt;   
&lt;img src="banner1.jpg" width="645" height="300"/&gt;text 1  
&lt;img src="banner2.jpg" width="645" height="300"/&gt;text 2   
&lt;img src="banner3.jpg" width="645" height="300"/&gt;text 3 
&lt;img src="banner3.jpg" width="645" height="300"/&gt;text 4 
&lt;/div&gt;
</code></pre>

<p>which is rendered by a php script is there any way I could add li/li on each image and text using javascript ex.</p>

<pre><code>&lt;li&gt;&lt;img src="banner1.jpg" width="645" height="300"/&gt;text 1&lt;/li&gt;  
&lt;li&gt;&lt;img src="banner2.jpg" width="645" height="300"/&gt;text 2&lt;/li&gt;
</code></pre>

<p>I am trying to use simple jquery slideshow on it but the text won't join the image when fading in and fading out, may be with the li I could use another slide show effect </p>

<p>any idea thanks.</p>

<p>I have no control/idea on the php. </p>

<p>Guys heres the source code for your script </p>

<pre><code> &lt;head&gt;
 &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
 &lt;title&gt;Untitled Document&lt;/title&gt;
 &lt;script   src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"&gt;
 &lt;/script&gt;
 &lt;script type="text/javascript"&gt; 
 $(document).ready(function() { var i = 0,     
 imgTxt = $('.fadein').text().trim      ().split('\n'),     
 wrapedImgs =    $('.fadein').children().map(function() {         
 var tmp = '&lt;img   src="' + this.src + '" width="' + this.width + '" 
 height="' + this.height + '" /&gt;' + imgTxt[i];         i += 1;         return   
 tmp;     }).get().join('&lt;/li&gt;&lt;li&gt;');  $('.fadein').html('&lt;ul&gt;&lt;li&gt;' + wrapedImgs 
 + '&lt;/li&gt;&lt;/ul&gt;'); }); 
 &lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div class="fadein"&gt;    &lt;img src="banner1.jpg" width="645" height="300"/&gt;text 1   
&lt;img src="banner2.jpg" width="645" height="300"/&gt;text 2    &lt;img src="banner3.jpg"   
width="645" height="300"/&gt;text 3  &lt;img src="banner3.jpg" width="645"  
 height="300"/&gt;text 4   &lt;/div&gt; 
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
