Change background color of active button
<p>I have 2 buttons. I want to change the background-color of only active button. I have written a j Query which is like this:</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>$('button').click(function() {
    var value = $(this).attr('class');
    alert(value);
    if (value == "menu") {
        $(this).removeClass("current");
        $(this).addClass("current");
    }

});</code></pre>
<pre class="snippet-code-css lang-css prettyprint-override"><code>.current {
    background - color: blue;
    color: white;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
&lt;button class="menu" type="button" class="btn buttn"&gt;All&lt;/button&gt;
&lt;button class="menu" type="button" class="btn buttn"&gt;Tag1&lt;/button&gt;</code></pre>
</div>
</div>
</p>

<p>When i am clicking the button css property is not applying. Can anybody tell me where i am doing wrong? </p>