I have a block of text I would like to change to an ul list. To determine where the text would break I thought I could use a character like / So the text might be.
<p>
/Red Car/Green Car/Black Car
</p>
I need a list like this.
<ul>
<li>Red Car</li>
<li>Green Car</li>
<li>Black Car</li>
</ul>
I've been trying to do it like this.
$(function(){
var list = '';
$('.whatWeDo').find('=').each(function(){ //.whatWeDo id the <p>
list += '<li>' + $(this).next() + '</li>';
});
var theList = $('ul').append(list);
$('.whatWeDo').html(theList);
})