Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Created August 14, 2015 15:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jesseeproductions/e950af6c6cdfcfe7c78e to your computer and use it in GitHub Desktop.
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
/*
* 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
};
@HC-Prod
Copy link

HC-Prod commented Jun 1, 2020

BIG thanks!
Wouldn't you also have a way to display an event with a single click on the calendar? ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment