Tsk, I should also answer the question fully. The affected content is:
-----Original Message----- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] 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" <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] On > > Behalf Of GianCarlo Mingati > Sent: 02 April 2008 15:22 > To: jQuery (English) > Subject: [jQuery] Re: hide() and floating elements leaves white space > > i think you should get a copy of the markup of the entire LI element > you want to hide, and pointing to that LI element onclick > you .remove() it. > To reappend it, store the position of the removed li (.eq(n)), and re > - insertAfter() the element that precedes the one you removed... > ?? > > On Apr 2, 11:53 am, "Richard Weeks" <[EMAIL PROTECTED]> > wrote: > > This is killing me! Due to the rule of supply and demand, I'm sure > there > > must be a workaround as there are so many people in forums searching > for > > the same grail... > > > Picture a list: > > > A B C > > D E F > > G H I > > > The list items are floating left, using CSS, on a fixed width to > > simulate 3 columns. > > > If I call .hide() on item 'E', no matter what I do, I am left with: > > > A B C > > D # F > > G H I > > > (# = space) > > > What I want is: > > > A B C > > D F G > > H I > > > CSS "display-inline" doesn't work as you can't set width on an inline > > element. Is there something I can do with jQuery to get the expected > > behaviour? > > > Thanks, > > > Richard