internet explorer 8 - jQuery 1.4 Dynamically created images aspect ratio incorrect in IE8 and max-width -


After upgrading to jQuery 1.4, when I try to dynamically add an image to a page using jQuery 1.4 in IE8, then image

Lose the right aspect ratio It affects only IE8 (IE7 and Firefox works fine), jQuery 1.4 (1.3.2 works fine). Including the jQuery compatibility file does not fix the problem.

  & lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Transcription // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" language = "javascript" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt ;! - Resolving switching problem at 1.3.2 - & gt; & Lt ;! - & lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" language = "javascript" type = "text / javascript" & gt; & Lt; / Script & gt; - & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {var dynImg = $ ('& lt; img & gt; & lt; / img & gt;'). Attr ('src', 'http://www.google. Com / intl / en_ALL / picture / logo.gif '); $ (' body '). Attachment (dynImg);}); & Lt; / Script & gt; & Lt; Style type = "text / css" & gt; IMG {max-width: 5 AM; } & Lt; / Style & gt; & Lt; / Head & gt; K & lt; Body & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Based on i

IMG {width: auto; Height: auto; }

for my CSS


Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

tsql - Correct sql/hql query (aggregate in where clause) -