<html>
<head>
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("div span:first-child")
.css("text-decoration", "underline")
.hover(function () {
$(this).addClass("red");
}, function () {
$(this).removeClass("red");
});
});
</script>
<style>
span { color:#008; }
span.red { color:red; font-weight: bolder; }
</style>
</head>
<body>
<body>
<div>
<span>A,</span>
<span>B,</span>
<span>C</span>
</div>
<div>
<span>D,</span>
<span>E,</span>
<span>F</span>
</div>
</body>
</html>
|