[jQuery] hide() and floating elements leaves white space

[jQuery] hide() and floating elements leaves white space


Tsk, I should also answer the question fully. The affected content is:
<li><a href="<link>">Link</a></li>
Richard
-----Original Message-----
From: jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com] On
Behalf Of GianCarlo Mingati
Sent: 03 April 2008 14:02
To: jQuery (English)
Subject: [jQuery] Re: hide() and floating elements leaves white space
Ciao Richard,
i'm glad you get the solution.
could you show us the piece of code you used?
i don't understand (and i'm always curious to 'see') what you click to
remove the LI.
Is it a LI with an A and an IMG?
If so, when you remove() an element don't you 'destroy' it? How do you
pass it back as the target?
GC
On 3 Apr, 11:33, "Richard Weeks" <Richard.We...@aquaterra.org> wrote:
> Thanks, that prompted me to think correctly.
>
> The solution is even simpler. The element I was show / hiding was
within
> an li element and it was this being left that led to space remaining
on
> removal of the contained element (in IE of course).
>
> What I did instead was remove the li, i.e. the parent:
>
> $(target).parent().hide();
>
> And...
>
> $(target).parent().show();
>
> Where target is the name of the element.
>
> That works very nicely.
>
> Richard
>
> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com]