Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 11 years ago

#4582 closed enhancement (duplicate)

Cross-browser jQuery(html) behaviour

Reported by: borg42 Owned by:
Priority: major Milestone:
Component: core Version: 1.3.2
Keywords: html area map Cc:
Blocked by: Blocking:


The following should do the same and should work for all tags* in major browsers:

$('<area/>').attr('class', 'myArea');
$('<area class="myArea");

As of v1.3.2, the above commands don't always work in a cross-browser way. (Firefox is pickier than IE here.)

*: it'd be also great if it'd support tags that can appear inside the html body.

Idea: for performance reasons, what about the following implementation: always running the usual div-.innerHTML, detecting failure (.length=0 / tag name /..), and if so, split the string and create the tag with createElement, then apply the attributes? This would only slow down specific tags, and only for browsers that can't create the elements with div-.innerHTML. Furthermore, it wouldn't slow down previously supported tag creations, only new ones.

Change History (3)

comment:1 Changed 14 years ago by dmethvin

This is related to #4559 and #4484.

comment:2 Changed 12 years ago by dmethvin

Resolution: duplicate
Status: newclosed

comment:3 Changed 12 years ago by dmethvin

Duplicate of #4484.

Note: See TracTickets for help on using tickets.