[jQuery] Re: Removing an emptied paragraph from the DOM

2009-06-20 Thread Mauricio (Maujor) Samy Silva
How about? $('.buggybox').next('p').remove(); Maurício -Mensagem Original- De: Bruce MacKay Para: jquery-en@googlegroups.com Enviada em: sábado, 20 de junho de 2009 08:20 Assunto: [jQuery] Removing an emptied paragraph from the DOM Hello folks, I have an application

[jQuery] Re: Removing an emptied paragraph from the DOM

2009-06-20 Thread Bruce MacKay
Thanks Mauricio, I hadn't tried that angle, but unfortunately it didn't make any difference. I've also tried adding a class to the initial parent p and then trying to remove all paragraphs containing that class name - and have achieved the same nil outcome. Thanks for your input. Cheers,

[jQuery] Re: Removing an emptied paragraph from the DOM

2009-06-20 Thread Charlie
parnt.length isn't zero so if you are still using that test could the the problem think about it a second, if you assign $(this).parent() to it how can length be zero? also you have a syntax error $(this).insertBefore(p)// should have quotes around p unless it is a variable if you aren't

[jQuery] Re: Removing an emptied paragraph from the DOM

2009-06-20 Thread liam193
I think your issue is one equal sign instead of two equals signs. Basically, you are trying to set the length (which is read-only). That likely evaluates to false when it fails. Change your test to: parnt.length==0 On Jun 20, 7:20 am, Bruce MacKay b.mac...@massey.ac.nz wrote: Hello folks, I