The code is syntactically wrong as you you have mixed up the function ending braces.
Below is the syntactically manipulated code. Hope you find that helpful.
jQuery(document).ready(function ($) {
var sliderHeight = $(window).height()-$('.slider').position().top;
$('.slider').css({ 'height': sliderHeight });
$('.landing-title').css({ 'top': $('.slider').height()/2 - $('.landing-title').height()/2 }) ;
});
$(window).resize(function(){ sliderHeight = $(window).height()-$('.slider').position().top;
$('.slider').css({ 'height': sliderHeight });
$('.landing-title').css({ 'top': $('.slider').height()/2 - $('.landing-title').height()/2 }) ;
});
2
solved Please check jQuery syntax [closed]