<!DOCTYPE html PUBLIC "- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>jQuery Attribute Predicate Demo</title>
<script type="text/javascript" src="jquery.pack.js"></script>
</head>
<body>
<h1>
jQuery Attribute Predicate Demo
</h1>
<ul>
<li id="list1">One</li>
<li id="list2">Two</li>
<li id="list3">Three</li>
</ul>
<h2>
Tests / Results
</h2>
<h3>
Full Match: "li[ @id = 'list1' ]"
</h3>
<p>
<script type="text/javascript">
document.write(
$( "li[ @id = 'list1' ]" ).text()
);
</script>
</p>
<h3>
Start With Match: "li[ @id ^= 'list' ]"
</h3>
<p>
<script type="text/javascript">
document.write(
$( "li[ @id ^= 'list' ]" ).text()
);
</script>
</p>
<h3>
Ends With Match: "li[ @id $= '3' ]"
</h3>
<p>
<script type="text/javascript">
document.write(
$( "li[ @id $= '3' ]" ).text()
);
</script>
</p>
<h3>
Contains Match: "li[ @id *= 'st' ]"
</h3>
<p>
<script type="text/javascript">
document.write(
$( "li[ @id *= 'st' ]" ).text()
);
</script>
</p>
</body>
</html>