title: jQuery plugin inside an independent function
body: <p>I've been trying to define a function that calls a jquery plugin that works without a selector</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-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;script src="https://cdnjs.cloudflare.com/ajax/libs/mouse0270-bootstrap-notify/3.1.7/bootstrap-notify.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      $.notify({
          // options
          message: 'Hello World'
      }, {
          // settings
          type: 'danger'
      });
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This first one works as intended,
  but when trying this next setup</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-html lang-html prettyprint-override"><code>&lt;script&gt;
      function sendNotification() {
          $.notify({
              // options
              message: 'Hello World'
          }, {
              // settings
              type: 'danger'
          });
      }
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>it throws a <strong>$.notify not defined</strong></p>