From jQuery JavaScript Library
« Back to Selectors
:parent
Matches all elements that are parents - they have child elements, including text.
Examples:| Name | Type |
Finds all tds with children, including text.
$("td:parent").fadeTo(1500, 0.3);
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="../jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("td:parent").fadeTo(1500, 0.3);
});
</script>
<style>
td { width:40px; background:green; }
</style>
</head>
<body>
<table border="1">
<tr><td>Value 1</td><td></td></tr>
<tr><td>Value 2</td><td></td></tr>
</table>
</body>
</html>