.fadeIn() not working properly

I’m trying to have a quote that fades in when you scroll all the way the bottom to the page. I have this little bit of inline jquery (it’s so little I can’t really justify making a new file), but it doesn’t seem to work. The quote keeps an opacity of 0:

    if($(document).height()-$(window).height() < $(document).scrollTop() + 20) {

    else {

when I remove the if/else statement, the fadeIn still doesn’t work, so that’s why I’m confident saying that the issue lies with something else

Thanks so much,

also, heads up, I’m a total jQuery and js noob.

Source: stackoverflow-javascript