Mohsen Saboorian schreef: > Thanks Jake, but unfortunately it does't fix my problem.The parent node might > have other children which should not be changed, e.g. > <span> <b>abc</b> <span class="a">efgh</span> <i>ijkl</i></span> > should be changed to: > <span> <b>abc> efgh <i>ijkl</i></span> > Thanks. > On 12/26/06, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:> try:>> > $("span.a").parent().each(function() {> > var t = $(this).text()> > $(this).html(t)> }) > > > i don't know if it works but try
$("span.a").parent().each(function() { if($(this).is("span.a")){ var t = $(this).text(); $(this).html(t); } }); -- David Duymelinck ________________ [EMAIL PROTECTED] _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/