On 26 Nov., 23:30, asle <[EMAIL PROTECTED]> wrote: > Hello, > I have a small menu bar <div> with several buttons. Only the height of > the buttons. I.ex. one button creates a new list item under the bar. A > <span> element (.msg) shows the message where I output "New item > created" after every click and fade it out. If I use > $(".msg").replaceWith(text).fadeOut("slow") - I only get the text on > the first click. And the text does not fade out. I believe > "replaceWith" replaces the element with a new one and removes the > event? > > When I use: > $(".msg").html(txt) or > $(".msg").text(txt) > the message shows every time but from the second time I click and on > it shows under the buttons. I believe it displays block then? How do I > avoid it breaking under the elements and displaying inline? > > Thanks, > /asle
I think the animation makes an element block, but I thought this is reverted afterwards. Anyway, try to float elements or maybe set the display again to inline in the callback of the animation. --Klaus