<?php do_action('foundationPress_before_closing_body'); ?>
<div style="display: none;">
<div class="weather-widget">
- <div class="weather-widget-inner">
- <iframe scrolling="no" frameborder="0" src="<?php echo home_url(); ?>/wp-content/themes/VisitAlpena/parts/weather.php"></iframe>
+ <div class="weather-widget-inner" style="background-color: lightblue;">
+ <?php dynamic_sidebar("weather-widget"); ?>
</div>
</div>
</div>
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;
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;
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');
'before_widget' => '<article id="%1$s" class="large-4 columns widget %2$s">',
'after_widget' => '</article>',
'before_title' => '<h6>',
- 'after_title' => '</h6>'
+ 'after_title' => '</h6>'
));
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' => '<div class="weather-widget">',
- //'after_widget' => '</div>'
+ //The plugin doesn't use these arguments, ugh... Put them in the template
+ 'before_widget' => '<div class="weather-widget">',
+ 'after_widget' => '</div>'
));
}