title: How to use code from external .js files in blade.php?
body: <p>I have resources/js/jquery.js files where I listen to button be pressed threw jQuery, and do some actions. The problem is that I can't import jquery.js into my .blade.php.</p>
  
  <p>I added jquery.min.js into by public/js.</p>
  
  <p>What I have in <strong>.blade.php</strong></p>
  
  <pre><code>&lt;form id="RegisterForm" method="GET"&gt;
      &lt;input type="text" name="username" id="username"&gt;
      &lt;input type="text" name="email" id="email"&gt;
      &lt;input type="text" name="password" id="password"&gt;
      &lt;input type="text" name="password2" id="password2"&gt;
      &lt;input type="submit" value="REGISTER" id="registerButton"&gt;
  &lt;/form&gt;
  &lt;script src="{{asset('js/jquery.min.js')}}"&gt;&lt;/script&gt;
  &lt;script src="/js/jquery.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>What I have in <strong>jquery.js</strong></p>
  
  <pre><code>window.onload = function(){
  $(document).ready(function(){
      $('#registerButton').click(function(){
          alert("Hello");
      });
   });
  }
  </code></pre>
  
  <p>I need to get <code>alert("Hello");</code></p>
  
  <p>The problem is that when click to the button nothing happens, I'm not sure if it bcs I added jquery.min.js wrongly, or just including my jquery.js script is wrong. Or this is impossible and I have to add this in the bottom of the body in my .blade.php</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      window.onload = function(){
          $(document).ready(function(){
              $('#registerButton').click(function(){
                  alert("Hello");
              });
          });
      }
  &lt;/script&gt;
  </code></pre>