added autoscroll

pull/2843/head^2
HB9HIL 2023-12-18 09:01:45 +01:00
rodzic ecc6b9110c
commit 43f6575aec
1 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -3067,7 +3067,7 @@ function viewEqsl(picture, callsign) {
<?php } ?>
<?php } ?>
<?php if (($this->uri->segment(1) == "user") && ($this->uri->segment(2) == "edit")) { ?>
<?php if ($this->uri->segment(1) == "user") { ?>
<!-- [MAP Custom] select list with icons -->
<script>
$(document).ready(function(){
@ -3088,6 +3088,20 @@ function viewEqsl(picture, callsign) {
}
$('.icon_selectBox_data[data-boxcontent="'+boxcontent+'"]').hide();
});
$('.collapse').on('shown.bs.collapse', function(e) {
var $card = $(this).closest('.accordion-item');
var $open = $($(this).data('parent')).find('.collapse.show');
var additionalOffset = 0;
if($card.prevAll().filter($open.closest('.accordion-item')).length !== 0)
{
additionalOffset = $open.height();
}
$('html,body').animate({
scrollTop: $card.offset().top - additionalOffset
}, 300);
});
});
</script>
<?php } ?>