Skip to main content

Bug Tracker

Side navigation

Ticket #5469: select.2.html
File select.2.html, 0.7 KB (added by fforw, November 09, 2009 10:39AM UTC)

same test using find, not working either..

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>jQuery Selector Test</title>

<script type="text/javascript" src="script/jquery-1.3.2.js">
</script>

<script type="text/javascript"><!--//--><![CDATA[//><!--

$(function()
{
	var $tst = $("#tst");

	var $span = $tst.find(".foo span");

	$(document.body).append($span.length ? "<p>SPAN found!</p>" : "<p style=\"color: red;\">SPAN NOT found!</p>");
    
});

//--><!]]></script>
</head>
<body>

<div id="tst" class="foo">
	<span>xxx</span>
</div>

</body>
</html>

Download in other formats:

Original Format