Bug Tracker

Modify

Ticket #1940 (closed bug: invalid)

Opened 6 years ago

Last modified 6 years ago

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:
Blocking: Blocked by:

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 Download (996 bytes) - added by romitch 6 years ago.
just run in firefox and ie and see the difference

Change History

Changed 6 years ago by romitch

just run in firefox and ie and see the difference

comment:1 Changed 6 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 6 years 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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.