[jQuery] context-based selection in internet explorer 7 doesn't work
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Nachricht</TITLE>
<STYLE type=text/css>BODY {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 10pt; PADDING-BOTTOM: 0px; MARGIN: 0px; COLOR: #000000; PADDING-TOP: 0px; FONT-FAMILY: Arial
}
A:link {
COLOR: #000000; TEXT-DECORATION: underline
}
A:active {
COLOR: #000000; TEXT-DECORATION: underline
}
A:visited {
COLOR: #000000; TEXT-DECORATION: underline
}
A:hover {
COLOR: #000000; TEXT-DECORATION: none
}
TD {
FONT-SIZE: 12px
}
</STYLE>
<META content="MSHTML 6.00.5730.13" name=GENERATOR></HEAD>
<BODY style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Arial" background="">
<DIV>h<SPAN class=687474411-01042009>ello!</SPAN></DIV>
<DIV><SPAN class=687474411-01042009></SPAN> </DIV>
<DIV><SPAN class=687474411-01042009>i have a problem with the context-based
selection of elements in a html-string in internet explorer 7.</SPAN></DIV>
<DIV><SPAN class=687474411-01042009></SPAN> </DIV>
<DIV><SPAN class=687474411-01042009>with the following code: </DIV>
<DIV>
<P><SPAN class=687474411-01042009>var </SPAN>htmltmp = '<div style="width:
1100px;"><img src="test.gif" width="300" id="testphoto"
/></div>'; </P>
<P>alert($('#testphoto', htmltmp).attr('width')); </P>
<P>the internet explorer shows "0" and the firefox shows the right "300". </P>
<P><SPAN class=687474411-01042009>has anybody a workaround or the solution why
this doesn't work?</SPAN></P>
<P><SPAN class=687474411-01042009>i`m using jQuery 1.3.2</SPAN></P>
<P><SPAN class=687474411-01042009>thanks for your attention.</SPAN></P>
<P><SPAN class=687474411-01042009>netCo</SPAN></P></SPAN></DIV></BODY></HTML>