title: How to create 3 state checkbox button with bootstrap 4
body: <p>I'm creating a filter form, I want to filter out objects with the property high=true, or high=false or ignore that property.<br>
  All I'm getting is the value "on" so far.<br>
  Also on the third value (null or whatever) I want the styling to be different, like disabled.<br>
  Anyone know an easy way to do this?</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>function readValue() {
    var highValue = $('#high').val();
    $('#result').html(highValue);
    if (highValue === null) {
      //don't filter
    } else {
      //filter
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"&gt;
  
  &lt;div class="btn-group-toggle" data-toggle="buttons"&gt;
    &lt;label onclick="readValue()" class="btn btn-secondary active"&gt;
      &lt;input id="high" type="checkbox" checked autocomplete="off"&gt; High
    &lt;/label&gt;
  &lt;/div&gt;
  Result:&lt;div id='result'&gt;&lt;/div&gt;
  
  &lt;script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>