Skip to main content

Bug Tracker

Side navigation

#14208 closed bug (notabug)

Opened July 31, 2013 12:23PM UTC

Closed July 31, 2013 03:20PM UTC

wrap() function duplicates in IE

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:

When i try to unwrap in string the <p> tag and then wrap the same contents with <div> tag it workes with Chrome, but not with IE.


<div id="div1">

One string <p>Two string </p>



if($(this).prop("tagName").toLowerCase() == 'p')




in Chrome

<div id="div1">

One string <div>Two string </div>


in IE

<div id="div1">

<div>One string </div><div>Two string </div>


I think this is enough for you to understand the problem, but please contact me if you need more information.

Thank you for your attention.

Attachments (0)
Change History (1)

Changed July 31, 2013 03:20PM UTC by gibson042 comment:1

resolution: → notabug
status: newclosed

Behavior of manipulation methods in general is not guaranteed for non-element nodes like the text node in your example. Note that both .wrap and .unwrap are clear to specify that they operate upon ''elements''.