A piece of code is functioning properly for me.
Now, I aim to incorporate this code into a TypeScript application. While I prefer to continue using jQuery, I am unsure how to adjust the use of this
to meet TypeScript requirements.
if ($(this).width() < 769) {
$('body').addClass('page-small');
} else {
$('body').removeClass('page-small');
$('body').removeClass('show-sidebar');
}
In TypeScript, this
corresponds to the current class. What should I substitute it with for the expected functionality?