Bug Tracker

Ticket #1940 (closed bug: invalid)

Opened 10 months ago

Last modified 10 months ago

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

Reported by: romitch Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.2.2 Component: core
Version: 1.2.1 Keywords: firefox wrap
Cc: Needs: Review

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

firefox_wrap_bug.html (1.0 kB) - added by romitch 10 months ago.
just run in firefox and ie and see the difference

Change History

Changed 10 months ago by romitch

just run in firefox and ie and see the difference

Changed 10 months 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...

Changed 10 months ago by brandon

  • status changed from new to closed
  • resolution set to invalid

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.