i am trying to remove parent tag,
but removing parent tag should not remove their child element.
The child should get attached previous tag
Below is the code:
<div class="mask">
<ul id="TickerT" class="news">
<ul class="tweet_list">
<li class="first odd">
<span class="tweet_time">about 8 minutes ago</a></span>
<span class="tweet_join"></span>
<span class="tweet_text">test test…</a></span></li>
</ul>
</ul>
</div>
</div>
There are at-least 5 <li> and now i want to delete <ul class="tweet_list">.
I have tried it with jQuery’s replaceWith but no result.
Here’s the code i have used from a site
var jj = $(“ul.tweet_list”).contents()
$(“.tweet_list”).replaceWith(jj);
But this didn’t worked.
What i wanted is i want to remove <ul class="tweet_list"> but not <li> of that <ul>.
Help appreciated, Thanks..
There is no content method on jquery. Try the html method.