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
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,
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
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
4 matches
Mail list logo