I was trying to do a very simple image-swap effect:

<div id="foo">
<p><img ... /></p>

<div id="bar">
<p><img ... /></p>


I expected both #foo and #bar to contain the same image, but instead, #foo was empty, and #bar contained the image originally in #foo.

I resolve the problem by changing my method from copying the P to simply making the two images have the same src attribute.

But can anyone explain what my conceptual failure was here? Why did update() seem to do what I would have expected the following construction to do:



Thanks in advance,


You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to