Bug Tracker

Opened 13 years ago

Closed 13 years ago

#1940 closed bug (invalid)

wrap method doesn't work in FireFox (2.0.0.9) when pass parameter as string ...

Reported by: romitch Owned by:
Priority: major Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: firefox wrap Cc:
Blocked by: Blocking:

Description

When passing parameter to $('..').wrap as string (e.g. "<div ..> </div>" ) - causing error in FireFox....

Works fine in IE7 See attached test html page for details....

Attachments (1)

firefox_wrap_bug.html (996 bytes) - added by romitch 13 years ago.
just run in firefox and ie and see the difference

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by romitch

Attachment: firefox_wrap_bug.html added

just run in firefox and ie and see the difference

comment:1 Changed 13 years ago by romitch

I've just realized that the problem is in the space between opening and closing tags : $("#testMe2").addClass("innerDiv").wrap("<div class='outerDiv'> </div>");

.. .wrap("<div class='outerDiv'></div>"); works fine

I don't know how to delete this...

comment:2 Changed 13 years ago by brandon

Resolution: invalid
Status: newclosed

As you said, wrap doesn't support text nodes and that space counts as a text node.

Note: See TracTickets for help on using tickets.