Please helpppppppp 😩

I'm trying to make this navbar to go from transparent to solid on scroll in angular7 typescript. Please convert this javascript to typescript

Code—-

$(document).ready(function() { // Transition effect for navbar $(window).scroll(function() { // checks if window is scrolled more than 500px, adds/removes solid class if($(this).scrollTop() > 500) { $('.navbar').addClass('solid'); } else { $('.navbar').removeClass('solid'); } }); })


Thankyou

submitted by /u/fatema_23k
[link] [comments]
Source: Reddit