Hello together,

I figured out a strange and - in my opinion - wrong behaviour in the
Prototype function "Element.insert": There´s a simple <span>-Element
somewhere in my website. Now I want to put another <span> Element
around it (and I don´t want to use the "wrap"-method!!). So I am doing
something like this:

My Html:
<span id="myElement"></span>

My JavaScript:
$("myElement").insert({before: '<span>'});
$("myElement").insert({after: '</span>'});

In the generated source-code it leads to:
<span/>
<span id="myElement"></span>

So the new <span>-Tag is inserted before the element. Anyone an idea
why?

Best regards!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to