title: Why is the onclick event for my input button not working?
body: <p>The <code>onclick</code>-function of the <code>&lt;button&gt;</code> in the following code is <strong>not</strong> working. </p>
  
  <p>I want to show a <em><strong>SAVE</strong></em> button when the editable area is clicked. Then the button's <code>onclick</code> function should display an <strong>alert</strong> but this is not working. </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-css lang-css prettyprint-override"><code>.views-submit-button {
    visibility: hidden;
  }
  
  .views-exposed-widget:focus-within+.views-submit-button {
    visibility: visible;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
   &lt;meta charset="utf-8"&gt;
   &lt;link rel="stylesheet"
      href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"&gt;
   &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"&gt;&lt;/script&gt;
   &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
   &lt;div class="container"&gt;
     &lt;div class="views-exposed-widget"&gt;
       &lt;div contenteditable id="editable-text-name"&gt;
      Editable text here.
     &lt;/div&gt;
     &lt;/div&gt;
     &lt;div class="views-submit-button"&gt;
       &lt;button id="save-button" type="button" onclick="alert('button clicked.')" class="btn btn-outline-dark"&gt;Save&lt;/button&gt;
     &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>