JS calls put into functions.php, slideshow enabled
authorLaury GvR <laury@gaslightmedia.com>
Fri, 2 Jan 2015 17:58:29 +0000 (12:58 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 2 Jan 2015 17:58:29 +0000 (12:58 -0500)
footer.php
functions.php
header.php
js/dollarsign.js [new file with mode: 0644]

index 5f7322a..4096efa 100644 (file)
@@ -13,8 +13,6 @@
     </div> <!-- off-canvas-wrap -->
 
 <?php wp_footer();?>
-<script src="<?php bloginfo('template_url');?>/js/vendor/jquery.js"></script>
-<script src="<?php bloginfo('template_url');?>/js/foundation.min.js"></script>
 <script>
     jQuery(document).foundation();
     jQuery(document).ready(function(){
index f61b12d..d00ea71 100644 (file)
@@ -23,6 +23,35 @@ if (!function_exists('glm_quicksite_widget_init')) {
 
 }
 
+/**
+ * site_scripts()
+ *
+ * Add the scripts that we'll need for any home page stuff
+ */
+function site_scripts()
+{
+    wp_enqueue_script(
+        'modernizr',
+        get_template_directory_uri() . '/js/vendor/modernizr.js'
+    );
+    wp_enqueue_script(
+        'jquery',
+        get_template_directory_uri() . '/js/vendor/jquery.js'
+    );
+    wp_enqueue_script(
+        'dollarsign',
+        get_template_directory_uri() . '/js/dollarsign.js'
+    );
+    wp_enqueue_script(
+        'foundation',
+        get_template_directory_uri() . '/js/foundation.min.js',
+        'jquery',
+        '1.0',
+        true
+    );
+}
+add_action('wp_enqueue_scripts', 'site_scripts');
+
 if (!function_exists('glm_wp_list_pages')) {
 
     function glm_wp_list_pages()
index b656fe5..d2df8ef 100644 (file)
@@ -11,8 +11,6 @@
 <link type="text/css" rel="stylesheet" href="<?php bloginfo('template_url'); ?>/qs.css">
 <link type="text/css" rel="stylesheet" href="<?php echo get_stylesheet_uri();?>">
 
-<script src="<?php bloginfo('template_url'); ?>/js/vendor/modernizr.js"></script>
-
 </head>
 
 <body>
diff --git a/js/dollarsign.js b/js/dollarsign.js
new file mode 100644 (file)
index 0000000..34d34e5
--- /dev/null
@@ -0,0 +1,8 @@
+/* 
+ * To avoid conflicts, Wordpress tends to prefer jQuery being used over $.
+ * As long as this file is included, no such conflicts should arise. Ensure it
+ * is called before other .js files using $.
+ */
+
+
+var $=jQuery.noConflict();