Hi Uwe,

Not sure why that's happening, but you could try this instead:

$('#result2').hide().remove()


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jan 2, 2008, at 1:35 PM, Uwe C. Schroeder wrote:



Hi Everyone,

I've run into a little problem which leaves me stunned.
I'm having a page with a list of div's (a search result). It looks like this:

<container div>
 <div id="result1"/>
 <div id="result2"/>
 <div id="result3"/>
 <div id="result4"/>
</container div>

the result divs certainly contain something. Now I have a button in each of the result divs that allows the result do be removed. When the button is
clicked (below for result2) this snipped of code is executed:

$('#result2').remove()

On FF2 this works nicely. Not so on IE7 (or 6 for that matter). What happens is that the element is removed, however the elements below are not moved up
properly. It now looks like this:

result 1
space the height of former result 2
result3 and result4 overlapping

The moment some other javascript that draws on the page is executed everyting falls in place correctly. In my case it's a modal "yes no" dialog (jqmodal), but I assume it doesn't really matter. Anything that "draws" on the page will
make it look correct.

Any ideas?
Thanks

        Uwe

Reply via email to