Are you adding SPAN({}) to a string or something?
appendChildNodes(idOfADiv, SPAN({})) should insert an empty SPAN,
but appendChildNodes(idOfADiv, SPAN({}) + ) might have the
behavior that you're describing. You want to use commas, not addition
to add multiple nodes, e.g. appendChildNodes(idOfADiv, SPAN({}),
text, DIV({}))
Using $() is not necessary because any function that expects a DOM
node will automatically do the getElement for you.
On Tue, Nov 25, 2008 at 2:24 PM, Bjoern [EMAIL PROTECTED] wrote:
Hello,
I am new to MochiKit and couldn't get appendChildNodes to work
properly. As an example, I tried
appendChildNodes($(idOfADiv), SPAN({}));
but on the website this shows up as [object HTMLSpanElement] (same
with images, created with IMG), so it doesn't look as if a span dom
object is being inserted.
What am I doing wrong?
Björn
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
MochiKit group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---