title: Change class active and input value on button click
body: <p>I have two buttons with hidden inputs, what i want to do is to make them active onclick, when they become active i want the background color of the button to change and add the class active to button and change the hidden input value from 0 to 1, here what i have tried so far: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".btn-default").click(function () {
        $(this).css('background-color', 'blue');
        $(this).toggleClass("active");
  
      });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>input{
  display: none;
  }
  
  .btn-default{
  background-color: red
  }</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 type="button" class="btn btn-default"&gt;Button 1&lt;/button&gt;
    &lt;input type="text" class="form-control" id="input1" value="0"&gt;
  
  &lt;button type="button" class="btn btn-default"&gt;Button 2&lt;/button&gt;
    &lt;input type="text" class="form-control" id="input2" value="0"&gt;</code></pre>
  </div>
  </div>
  </p>