title: Hide element if webcam is not detected (jhuckaby WebcamJS)
body: <p>I'm using jhuckyaby WebcamJS. If there is no detected webcam show the id <code>#forHide</code>, else show the id <code>#upload</code>:</p>
  
  <pre><code>&lt;div class="row" id="forHide"&gt;
      &lt;div class="d-inline-block ml-3"&gt;
          &lt;div id="my_camera" class="mb-2"&gt;&lt;/div&gt;
              &lt;input type=button value="Configure"      class="btn btn-primary btn-sm ml-1" onClick="configure()"&gt;
              &lt;input type=button value="Take Snapshot"  class="btn btn-primary btn-sm" onClick="take_snapshot()"&gt;
              &lt;input type=button value="Save Snapshot"  class="btn btn-primary btn-sm" onClick="saveSnap()"&gt;
      &lt;/div&gt;
  
      &lt;div class="d-inline-block ml-5"&gt;
          &lt;div id="results"&gt;&lt;/div&gt;
       &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="upload"&gt;
      &lt;form action="upload.php" method="post" enctype="multipart/form-data"&gt;
          Select image to upload:
          &lt;input type="file" name="fileToUpload" id="fileToUpload"&gt;
          &lt;input type="submit" value="Upload Image" name="submit"&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I read the docs on <a href="https://github.com/jhuckaby/webcamjs/blob/master/DOCS.md" rel="nofollow noreferrer">GitHub</a> and I tried to implement this code but somehow no result.   </p>
  
  <pre><code> Webcam.on( 'error', function(err) {
              // hide element
          } );
  </code></pre>