title: External Javascript Library not working
body: <p>I have a problem about external javascript file. It is not working</p>
  
  <pre><code>&lt;script type="text/javascript" src="ozel.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Ozel.js file only work if i add at the end of the page but i want to add <code>&lt;head&gt;</code> part. What is the problem? Could you help me? Thanks</p>
  
  <pre><code>&lt;?php
  include "connect.php";
  session_start();
  header('Content-Type: text/html; charset=utf-8');
  ?&gt;
  &lt;head&gt;
  &lt;link rel="shortcut icon" type="image/png" href="favicon.png"/&gt;
  &lt;link rel="shortcut icon" type="image/png" href="favicon.png"/&gt;
    &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
    &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css"&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
  
    &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.min.js"&gt;&lt;/script&gt;
    &lt;link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.12/css/all.css" integrity="sha384-G0fIWCsCzJIMAVNQPfjH08cyYaUtMwjJwqiRKxxE/rx96Uroj1BtIQ6MLJuheaO9" crossorigin="anonymous"&gt;
    &lt;link rel="stylesheet" type="text/css" href="style.css"&gt;
  
  &lt;script&gt;
  $(document).on('click', '[data-toggle="lightbox"]', function(event) {
                  event.preventDefault();
                  $(this).ekkoLightbox();
                      lightbox.option({
        'resizeDuration': 200,
        'albumLabel': "Image %1 of %2"
      })
              });
  
  function goBack() {
      window.history.back()
  }
  function goNext() {
      window.location.href='index.php'
  }
  &lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>Ozel.js</p>
  
  <pre><code>$("#gonderelim").click(function(){
      $("#rating").hide();
      $.ajax({ 
          type:"post",
          url:"voting.php",
          data:$("#voting").serialize(),
          success:function(cevap) {
              $("b").text(cevap);
          }
      })
      $("#stats").load("stats.php");
  })
  </code></pre>