jQuery IE7 on-the-fly images
- by Scott Evernden
The simplified version of the problem I am seeing in IE7 can be demonstated using FireBug Lite.
On a page loaded with jQuery, I open FireBug Lite (via bookmarket) and I enter the following:
image = $('<img src="http://example.com/boofar.jpg" border="12"
width="95" height="95" title="Booya">')[0];
and the result echoed is:
<img title="Booya" contentEditable="inherit" start="fileopen"
loop="1" src="http://example.com/boofar.jpg" border="12">
Where are the width and height attributes?
Furthermore,
image.width;
and
image.attributes.width.value;
return 0 and "0".
Seen this with both jQuery 1.2.6 as well as 1.4.2. It does the right thing in IE8 and FF.
Any ideas where those attributes went? Very annoying....