<html>
<head>
<script type="text/javascript" src='http://code.jquery.com/jquery-1.5.2.js'></script>
<script type="text/javascript">
$(document).ready(function(){
$("p").hover(
function () { $(this).addClass("y"); },
function () { $(this).removeClass("y"); });
});
</script>
<style>
.y { background:yellow; }
</style>
</head>
<body>
<body>
<p>a <div>ab</div> <div>abc</div></p>
</body>
</html>