Custom JS not working

Hello I’m using valid JS I wrote and inputted through ‘customize > custom > edit global javascript’.

The script works perfectly when viewing in the ‘customize’ window. Once I ‘publish’ and view the page outside of ‘customize’, the JS is not working at all. If i view source, the script being put in DOM, but for some reason not executing?

Here’s the script:

function parallaxFade() {
	scrollPos = $(this).scrollTop();
	$('.banner').css({
		'background-position' : '50% ' + (-scrollPos/3)+"px"
	});
	$('.banner-title').css({
		'margin-top': (scrollPos/3)+"px",
		'opacity': 1-(scrollPos/350)
	});
}
$(document).ready(function(){
    if ($('.banner').length ) {
        $(window).scroll(function() {
	        parallaxFade();
	    });
  }
  else{
      return;
  }
});

Here’s the page:
www.jordanandalec.com

Hi There,

Thanks for writing in! Regretfully, we cannot provide support for custom scripts or customization requests as it would be outside the scope of our support.

However when adding jQuery codes make sure to use jQuery keyword instead of $ sign and also make sure that you don’t include <script> </script> tags.

Thanks!

Thanks, looks like swapping out the instances of “$” for “jQuery” did the trick.