I have the following code that gets the body height and writes it to a div that displays as a table-cell so the content can be vertically centered on any screen size on resize. I've tested this and it works fine.
$( window).resize(function() {
bodyHeight = $('body').outerHeight();
console.log('bodyHeight =' + bodyHeight);
$('.table-cell').css('height', bodyHeight +'px');
});
Now if I try put it in Drupal using the code below. It doesn't work. jQuery is being called because I can run the script in Drupal but not when I specify to run it on resize.
jQuery(window).resize(function($) {
bodyHeight = $('body').outerHeight();
console.log('bodyHeight =' + bodyHeight);
$('.table-cell').css('height', bodyHeight +'px');
});