Skip to content

Instantly share code, notes, and snippets.

@faction23
Created January 28, 2014 20:04
Show Gist options
  • Save faction23/8675209 to your computer and use it in GitHub Desktop.
Save faction23/8675209 to your computer and use it in GitHub Desktop.
Modify Week view height in Tribe Events Calendar
jQuery(document).ready(function ($) {
if($('.tribe-week-grid-wrapper').length){
var height = 700;
function modify_slimscroll(){
$('.tribe-week-grid-wrapper')
.unwrap()
.removeAttr('style')
.slimScroll({
height: height + 'px',
railVisible: true,
alwaysVisible: true,
start: $('.time-row-8AM')
});
}
modify_slimscroll();
if (Object.prototype.hasOwnProperty.call(window, 'tribe_ev')) {
$(tribe_ev.events)
.on('tribe_ev_weekView_AjaxSuccess', function () {
modify_slimscroll();
});
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment