title: Sweetalert pop-up message with JavaScript when user hits Submit button
body: <p>I need a success message to pop-up when a user hits the <code>Submit</code> button. I tried to make a javascript file to solve the task, but something should be wrong because it does nothing.</p>
  
  <p>The Button(HTML):</p>
  
  <pre><code>&lt;button name="submit" type="submit" class="btn btn-primary btn-xl" id="sendMessageButton" action="form.js"&gt;Küldés&lt;/button&gt;
  </code></pre>
  
  <p>Javascript file:</p>
  
  <pre><code>$("#sendMessageButton").click(function(){
  Swal.fire(
      'Good job!',
      'You clicked the button!',
      'success'
      );
  });
  </code></pre>
  
  <p>Console Error:</p>
  
  <pre><code>Uncaught ReferenceError: Swal is not defined at HTMLButtonElement.&lt;anonymous&gt; (form.js:2) at HTMLButtonElement.dispatch (jquery.min.js:2) at HTMLButtonElement.y.handle (jquery.min.js:2)
  </code></pre>