title: Call js function from within the footer
body: <p>I have around a 30 page website. I have included a footer.php on every document. Every fourth page I have, has some different js scripts in the footer. That's starting to annoy me, and I am thinking of making a script folder where I have small scripts in. Is that a bad idea instead of having them directly in the footer?</p>
  
  <p>This is the script:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
        jQuery(document).ready(function() {
  
          $('.bxslider1').bxSlider({
            minSlides: 5,
            maxSlides: 6,
            slideWidth: 360,
            slideMargin: 2,
            moveSlides: 1,
            responsive: true,
            nextSelector: '#slider-next',
            prevSelector: '#slider-prev',
            nextText: 'Onward →',
            prevText: '← Go back'
          });
  
        });
  &lt;/script&gt;
  </code></pre>
  
  <p>If I save this in a js folder under "bannerslider.js", how can I call the function from the footer? Do I have to include, or echo the file?</p>