try:
$("span.a").parent().each(function() {
var t = $(this).text()
$(this).html(t)
})
On 12/25/06, Mohsen Saboorian <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a node list this:
>
> <span>
> abcd
> <span class="a">efgh</span>
> <span class="a">ijkl</span>
> <span class="a">mnop</span>
> qrst
> </span>
>
> Now, how can I remove all internal spans to have a single (now parent) span
> holding all letters, having a jQuery object which contains all span.a
> elements.
> I tried this but not working:
> $("span.a").each(function() {
> th = $(this);
> th.parent().html(th.siblings().eq(0).html + th.text() +
> th.siblings().eq(1).html());
> }
>
> The result should be something like this: <span>abcd efgh ijkl mnop
> qrst</span>
>
> Thanks.
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
>
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/