Ticket #5176 (closed bug: invalid)
Inserted elements with unbalenced quotes become unselectable
|Reported by:||brianfreud||Owned by:|
$("body").append('<div id=foo">'); console.log($("#foo").length);
Note that there is a " missing before foo. At least in FF3.0.13, <div id="foo"></div> does get created, and fireBug does show it has the id attribute set, but the created element is invisible to jQuery; note that fireBug reports 0, not 1, as the length on any following attempts to select that div.