bind

$(function() {
    $('div').bind("mouseover", function() {
        $('div').toggleClass('bar').css('font-size', '130%');
    $("div").bind("mouseout", function() {
        $('div').toggleClass('baz');
    });
    });
});

<!DOCTYPE html>
<html la="ja">
<head>
    <meta charset="utf-8">
    <title>JS</title>
    <style type="text/css">
        .bar {
            color: blue;
        }
        .baz {
            color: yellow;
        }
    </style>
    <script type="text/javascript" src="./jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>    <script src="./custom.js"></script>
</head>
<body>
<div>foo</div>
</body>
</html>

f:id:hrt0kmt:20141014173441p:plain