I have this piece of code in my mvc view where htmlcollection is a collection of many tables containing 4 rows each. Each table has a height of 40 px.
var scrollWindow = $('<div>', {
id: "scroll-window",
html: htmlCollection
});
<style>
#scroll-window {
height: 655px;
width: inherit;
overflow-y: auto;
}
</style>
$('#divCateringPX').append(scrollWindow);
I also have a button in my view on clicking which I want to scroll down a multiple of 40 px in divCateringPX. This question looks simple, but I am new to jquery and stuck. Kindly help.
Thanks.