pav
9/25/2013 - 1:27 PM

hover_page.html

div{
    background-color: green;
    height: 50px;
    width: 50px;
    float: left;
    margin: 40px;
}

.hover{
    background-color: blue;
    height: 60px;
    width: 60px;
    margin-right: 40px;
    margin-top: 30px;
    margin-left: 30px;
    margin-bottom: 30px;
}​
$(document).ready(function(){
    $('div').hover(function(){
        $(this).addClass('hover')
    },
    
    function(){
         $(this).removeClass('hover')
    }
    
)});
<html>

<head>
    <link rel="stylesheet" type="text/css" href="style.css"/>
    <script src="script.js"></script>
</head>

<body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</body>

</html>