tp-20,
...вариант
function down(id, h) {
let margin_top = parseFloat($('#images-additional_wrapper').css('margin-top'));
let max =
parseFloat($('.images-additional').css('height')) -
parseFloat($('#images-additional_wrapper').css('height'));
if (margin_top - h < max) h = margin_top - max;
$('#images-additional_wrapper').animate({
'margin-top': '-=' + h + 'px',
});
}
function up(id, h) {
let margin_top = parseFloat($('#images-additional_wrapper').css('margin-top'));
if (margin_top + h > 0) h = -margin_top;
$('#images-additional_wrapper').animate({
'margin-top': '+=' + h + 'px',
});
}