Hi Nitin,
Something similar to the following should work:
$('div.modan > p > a').each(function() {
$(this).parent().after( $('<ul><li></li></ul>').find('li').append( this
).end() ).remove();
});
Cheers,
- Jonathan
On Mon, Oct 5, 2009 at 10:19 AM, Nitin Gautam <[email protected]>wrote:
>
> I have following code
>
> <div class="modan">
> <h3 >Center</h3>
> <p>
> <a href="#">Keep a Long-Term Focus</a>
> </p>
> </div>
>
> My requirement is I have to remove the <p> tag and insert <ul> <li>
>
> <div class="modan">
> <h3 >Center</h3>
> <ul><li>
> <a href="#">Keep a Long-Term Focus</a>
> </li></ul>
> </div>
>
> How Can I do this using JQuery....Anchor link is getting generated
> dyncamically....
> Tell me the way to make it wrkng in both FF and IE