Skip to main content

Bug Tracker

Side navigation

#1940 closed bug (invalid)

Opened November 16, 2007 07:59PM UTC

Closed November 16, 2007 08:36PM UTC

wrap method doesn't work in FireFox ( 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:

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 (1.0 KB) - added by romitch November 16, 2007 08:00PM UTC.

    just run in firefox and ie and see the difference

Change History (2)

Changed November 16, 2007 08:30PM UTC by romitch comment:1

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 November 16, 2007 08:36PM UTC by brandon comment:2

resolution: → invalid
status: newclosed

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