Has someone else already posted this bug?
The following code shows jquery failing to detect the termination of a
tag.

Load the page and click on the word login. The selector should find
the empty
div and display the html content (nothing). Instead shows the span
closing tag
and the javascript that follows.

<html>
<head>
    <title>jQuery bug test Page</title>
   <script src="script/jquery-1.2.6.min.js" type="text/javascript"></
script>
</head>
<body style="background-color:black">
<span id="Login" style="position:absolute; top:20px; left:5%; width:
90%; z-index:12;">
        <span id="LoginToggle" style="float:right; color=green;">Login</span>
        <div class="popupContent" style="float:right;" />
</span>
<script type="text/javascript">
<!--
$( function()
{
        $("#LoginToggle").click( function(){ alert( $
( '#Login>div.popupContent' ).html() ); });
} );
//-->
</script>
</body>
</html>

 If you change the div closing it works correctly.
Change this:
        <div class="popupContent" style="float:right;" />
To this:
        <div class="popupContent" style="float:right;" ></div>

Does the same in IE7 and FF3

Reply via email to