My jQuery script is designed to vertically center text next to an image, but it seems to only work properly after resizing the page.
$(window).load(function () {
$(function () {
var adjustHeight = function () {
$('.vertical-align').height($('.featurette-image').height());
}
$(window).on('resize', function () {
if ($(window).width() > 765) {
adjustHeight();
} else {
$('.vertical-align').height('auto');
}
})
})
});