Skip to main content

Bug Tracker

Side navigation

Ticket #3867: test.html
File test.html, 1.3 KB (added by fstorm, January 15, 2009 11:15AM UTC)

Test case for the bug

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>
			Test
		</title>
		<style type="text/css">
		
			div {
				padding: 5px;
				margin: 5px;
				border: 1px solid red;
				background-color: #FFFFFF;
			}
			
			.test {
				background-color: #FFD0D0;
			}
			
			.test div div {
				background-color: #D0FFD0;
			}
		
		</style>
	</head>
	<body>

		
		<div class="test">
		
			<div>
			
				<div>a</div>
				<div>b</div>
				<div>c</div>
				
			</div>
		
		</div>
		
		<div>
			<div>
				<div>d</div>
				<div>e</div>
				<div>f</div>
			</div>
		</div>
		
		<hr />
		
		<span id="result">
		
		</span>
		
		<script type="text/javascript" src="jquery-1.3.min.js"></script>
		<script type="text/javascript">
			<!--
			
			jQuery(function() {
				jQuery("#result").html(
					"&quot;.test &gt; div &gt; div&quot; - results: "
					+ jQuery(".test > div > div").length
					+ "<br />&quot;.test div div&quot; - results: "
					+ jQuery(".test div div").length
				);
			});
			
			//-->
		</script>
		
	</body>
</html>

Download in other formats:

Original Format