<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.myDiv').hover(function() {
$(this).addClass('newClass');
}, function() {
$(this).removeClass('newClass');
});
});
</script>
</head>
<body>
<div class="myDiv">This is my new Div</div>
</body>
</html>
No comments:
Post a Comment