How to install the button box-shadow when programlevel block to the end?

https://codepen.io/malinosky/pen/WdNpja
I have a fixed block scroll and when I scroll to the end of the unit, the button will appear shadowed. What height I need to compare here?
June 10th 19 at 15:45
1 answer
June 10th 19 at 15:47
Solution
scrollButtonShadow function() {
 $('button').css('box-shadow', this.clientHeight >= this.scrollHeight - this.scrollTop ? '0px 0px 13px 0px rgba(0, 0, 0, 1)' : ");
}
$('.block').on('scroll', scrollButtonShadow);


PS $('button') is better to cache outside the callback function
Thank you! - Greta commented on June 10th 19 at 15:50

Find more questions by tags jQueryJavaScript