Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 8 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:

Description

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 10 years ago by dmethvin

This is related to #4559 and #4484.

comment:2 Changed 9 years ago by dmethvin

Resolution: duplicate
Status: newclosed

comment:3 Changed 9 years ago by dmethvin

Duplicate of #4484.

Note: See TracTickets for help on using tickets.