#5917 closed bug (fixed)
replaceWith is not working as mentioned in the api doc
Reported by: | neerajdotname | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4.2 |
Component: | manipulation | Version: | 1.4.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
replaceWith is working fine when only one element is replaced.
When more than one elements are to be replaced then all the elements are replace with a single element.
<h2>one</h2> <h2>two</h2> <h2>three</h2>
$('h2').replaceWith('<span>lab</span>');
Above code will replace all the three h2 with a single span.
Change History (5)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Ignore the previous link. Here is the correct one.
http://github.com/neerajdotname/jquery/commit/be86943bf84ebd3465e9d6a17bc11d4ee545206c
comment:3 Changed 13 years ago by
Component: | unfilled → core |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I added in the tests but they're all working. http://github.com/jquery/jquery/commit/532bec4c694532acbe2e14ad3b6ff72a4da90be0
A previous commit must've fixed this!
comment:4 Changed 13 years ago by
Milestone: | 1.4.1 → 1.4.2 |
---|---|
Version: | 1.4 → 1.4.1 |
comment:5 Changed 13 years ago by
Component: | core → manipulation |
---|
Note: See
TracTickets for help on using
tickets.
Added a failing test case to manipulation.js .
http://github.com/neerajdotname/jquery/commit/8901e9fedc70c5a6498905ce5792f2f6a5124df2