Skip to main content
edited tags
Link
fuxia
  • 107.1k
  • 38
  • 255
  • 459
Post Closed as "exact duplicate" by Chip Bennett, brasofilo, kaiser, s_ha_dum, fuxia

wordpress template add Add multiple javascript fileJavaScript files to template header

iI have a multiple java script fileJavaScript files that iI want to load some. Some of them in my wordpress file header.phpheader.php and the rest in the footerfooter.php.php these

These are the files:

  <?php
  <script type="text/javascript src="/scripts/jquery-1.8.2.min.js"></script>
  <script type="text/javascript src="/scripts/contact.js"></script>
 <script type="text/javascript src="/scripts/jquery.easing.1.3.js"></script>
 <script src="scripts/jsCarousel-2.0.0.js" type="text/javascript"></script>
  <script type="text/javascript">
    $(document).ready(function() {
    $('#carouselv').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: false, itemstodisplay: 3, orientation: 'v' });
        $('#carouselh').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, circular: true, masked: false, itemstodisplay: 3, orientation: 'h' });
        $('#carouselhAuto').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: true, itemstodisplay: 5, orientation: 'h' });

    });       
         
</script> ?>

wordpress template add multiple javascript file to header

i have a multiple java script file that i want to load some of them in my wordpress file header.php and the rest in the footer.php these are the files

  <?php
  <script type="text/javascript src="/scripts/jquery-1.8.2.min.js"></script>
  <script type="text/javascript src="/scripts/contact.js"></script>
 <script type="text/javascript src="/scripts/jquery.easing.1.3.js"></script>
 <script src="scripts/jsCarousel-2.0.0.js" type="text/javascript"></script>
  <script type="text/javascript">
    $(document).ready(function() {
    $('#carouselv').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: false, itemstodisplay: 3, orientation: 'v' });
        $('#carouselh').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, circular: true, masked: false, itemstodisplay: 3, orientation: 'h' });
        $('#carouselhAuto').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: true, itemstodisplay: 5, orientation: 'h' });

    });       
     
</script> ?>

Add multiple JavaScript files to template header

I have multiple JavaScript files that I want to load. Some of them in my header.php and the rest in the footer.php.

These are the files:

<?php
<script type="text/javascript src="/scripts/jquery-1.8.2.min.js"></script>
<script type="text/javascript src="/scripts/contact.js"></script>
<script type="text/javascript src="/scripts/jquery.easing.1.3.js"></script>
<script src="scripts/jsCarousel-2.0.0.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function() {
    $('#carouselv').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: false, itemstodisplay: 3, orientation: 'v' });
        $('#carouselh').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, circular: true, masked: false, itemstodisplay: 3, orientation: 'h' });
        $('#carouselhAuto').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: true, itemstodisplay: 5, orientation: 'h' });

    });               
</script> ?>
Source Link
sarah
  • 67
  • 2
  • 11

wordpress template add multiple javascript file to header

i have a multiple java script file that i want to load some of them in my wordpress file header.php and the rest in the footer.php these are the files

  <?php
  <script type="text/javascript src="/scripts/jquery-1.8.2.min.js"></script>
  <script type="text/javascript src="/scripts/contact.js"></script>
 <script type="text/javascript src="/scripts/jquery.easing.1.3.js"></script>
 <script src="scripts/jsCarousel-2.0.0.js" type="text/javascript"></script>
  <script type="text/javascript">
    $(document).ready(function() {
    $('#carouselv').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: false, itemstodisplay: 3, orientation: 'v' });
        $('#carouselh').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, circular: true, masked: false, itemstodisplay: 3, orientation: 'h' });
        $('#carouselhAuto').jsCarousel({ onthumbnailclick: function(src) { alert(src); }, autoscroll: true, masked: true, itemstodisplay: 5, orientation: 'h' });

    });       
    
</script> ?>