<div id=d1 class='msg'>Hover over this box, to change color</div>
jquery
<script>
$(document).ready(function() {
///// Mouse over and Mouse out ///
$("#d1").hover(function(){
///////// mouse enter function ////
$('#d1').css("background-color", "blue");
//////// mouse out function //////////
}, function(){
$('#d1').css("background-color", "yellow");
});
////// Mouse over and Mouse out end /////
})
</script>