Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 3
    Cross browser compatibility... my testing shows that FireFox copies over the .value as part of the .clone(), therefore rendering it useless
    – freefaller
    Commented Mar 19, 2014 at 12:39
  • @freefaller why not change the value before calling replaceWith? I am using clone() myself and it's working fine in firefox (I don't know if this is still the case for you a year later =) )
    – Abdo
    Commented Feb 3, 2015 at 22:45
  • @Abdo - if you look at my answer you'll see that I do
    – freefaller
    Commented Feb 4, 2015 at 8:11
  • The question isn't asking about jQuery; it's asking about javascript.
    – Arel
    Commented Mar 18, 2019 at 15:44