From 18332f74820341fb72d385074c6e2890268ea978 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 20 Oct 2014 16:58:47 -0400 Subject: [PATCH] weather update --- footer.php | 4 ++-- js/app.js | 5 ++++- js/custom/weather-widget.js | 5 ++++- library/enqueue-scripts.php | 4 ++-- library/widget-areas.php | 8 ++++---- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/footer.php b/footer.php index 22c3f0d..0673707 100644 --- a/footer.php +++ b/footer.php @@ -37,8 +37,8 @@
-
- +
+
diff --git a/js/app.js b/js/app.js index 51fa8b9..fea8051 100644 --- a/js/app.js +++ b/js/app.js @@ -49,10 +49,13 @@ function get_footer_position() { if ($('.weather-widget').length && $('.weather-widget-popup').length) { $('.weather-widget').appendTo($('.weather-widget-popup')); $('.weather-widget-popup > a').on('click', function(){ - if ('.weather-widget').is(':visible') { + console.log('toggle me'); + if ($('.weather-widget').is(':visible')) { + console.log('hidden now showing'); $('.weather-widget').css({'display': 'none'}); } else { + console.log('shown now hiding'); $('.weather-widget').css({'display': 'block'}); } return false; diff --git a/js/custom/weather-widget.js b/js/custom/weather-widget.js index 782cda2..3d5ab00 100644 --- a/js/custom/weather-widget.js +++ b/js/custom/weather-widget.js @@ -2,10 +2,13 @@ $(function(){ if ($('.weather-widget').length && $('.weather-widget-popup').length) { $('.weather-widget').appendTo($('.weather-widget-popup')); $('.weather-widget-popup > a').on('click', function(){ - if ('.weather-widget').is(':visible') { + console.log('toggle me'); + if ($('.weather-widget').is(':visible')) { + console.log('hidden now showing'); $('.weather-widget').css({'display': 'none'}); } else { + console.log('shown now hiding'); $('.weather-widget').css({'display': 'block'}); } return false; diff --git a/library/enqueue-scripts.php b/library/enqueue-scripts.php index 84ac28e..75ba8de 100644 --- a/library/enqueue-scripts.php +++ b/library/enqueue-scripts.php @@ -11,13 +11,13 @@ if (!function_exists('FoundationPress_scripts')) : wp_register_script( 'jquery', get_template_directory_uri() . '/js/jquery/dist/jquery.min.js', array(), '1.0.0', false ); wp_register_script( 'foundation', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true ); wp_register_script( 'custom', get_template_directory_uri() . '/js/custom/sticky-footer.js', array(), '1.0.0', true ); - wp_register_script( 'custom-weather', get_template_directory_uri() . '/js/custom/weather-widget.js', array(), '1.0.0', true ); +// wp_register_script( 'custom-weather', get_template_directory_uri() . '/js/custom/weather-widget.js', array(), '1.0.0', true ); // enqueue scripts wp_enqueue_script('modernizr'); wp_enqueue_script('jquery'); wp_enqueue_script('custom'); - + wp_enqueue_script('foundation'); wp_enqueue_script('custom-weather'); diff --git a/library/widget-areas.php b/library/widget-areas.php index 160cb40..0529875 100644 --- a/library/widget-areas.php +++ b/library/widget-areas.php @@ -18,16 +18,16 @@ function foundationpress_sidebar_widgets() { 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '
', - 'after_title' => '
' + 'after_title' => '' )); register_sidebar(array( 'id' => 'weather-widget', 'name' => __('Weather widget', 'Foundation Press'), 'description' => __('Container for pop-up weather widget.', 'FoundationPress'), - // The plugin doesn't use these arguments, ugh... Put them in the template - //'before_widget' => '
', - //'after_widget' => '
' + //The plugin doesn't use these arguments, ugh... Put them in the template + 'before_widget' => '
', + 'after_widget' => '
' )); } -- 2.17.1