Created
August 14, 2015 15:20
-
-
Save jesseeproductions/e950af6c6cdfcfe7c78e to your computer and use it in GitHub Desktop.
The Events Calendar Pro - Hide Mini Calendar Event List Until Calendar Date is Clicked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The Events Calendar Pro - Hide Mini Calendar Event List Until Calendar Date is Clicked | |
* TEC PRO @3.11.1 | |
*/ | |
add_action( 'wp_footer', 'tribe_hide_mini_calendar_list_until_clicked', 50 ); | |
function tribe_hide_mini_calendar_list_until_clicked() { | |
?> | |
<script> | |
var $ = jQuery.noConflict(); | |
jQuery(function($) { | |
$( ".tribe-mini-calendar-list-wrapper" ).fadeOut(); | |
$( ".tribe-mini-calendar-grid-wrapper" ).on( "click", function() { | |
$( ".tribe-mini-calendar-list-wrapper" ).fadeIn(); | |
}); | |
}); | |
</script> | |
<?php | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BIG thanks!
Wouldn't you also have a way to display an event with a single click on the calendar? ...