Side navigation
Ticket #5469: select.html
File select.html, 0.7 KB (added by fforw, November 07, 2009 03:48PM UTC)
Test page
<?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 = $(".foo span", $tst);
if ($span.length)
{
$(document.body).append("<p>SPAN found!</p>");
}
});
//--><!]]></script>
</head>
<body>
<div id="tst" class="foo">
<span>xxx</span>
</div>
</body>
</html>
Download in other formats:
Original Format
File select.html, 0.7 KB (added by fforw, November 07, 2009 03:48PM UTC)
Test page
<?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 = $(".foo span", $tst);
if ($span.length)
{
$(document.body).append("<p>SPAN found!</p>");
}
});
//--><!]]></script>
</head>
<body>
<div id="tst" class="foo">
<span>xxx</span>
</div>
</body>
</html>