Created
January 28, 2014 20:04
-
-
Save faction23/8675209 to your computer and use it in GitHub Desktop.
Modify Week view height in Tribe Events Calendar
This file contains 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
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