Javascript Angular无法在模式中向上滚动
我的Angular项目中有以下表单(我将jquery导入添加到ts文件):Javascript Angular无法在模式中向上滚动,javascript,jquery,html,angularjs,angular,Javascript,Jquery,Html,Angularjs,Angular,我的Angular项目中有以下表单(我将jquery导入添加到ts文件): 有什么我应该为你做的吗 是否有其他人对此问题有经验???是否有其他人对此问题有经验??? <style> body .ui-dialog .ui-dialog-content { overflow-y:scroll; /* I made the scrollbar of modal visible */ } </style> <div id="createF
有什么我应该为你做的吗 是否有其他人对此问题有经验???是否有其他人对此问题有经验???
<style>
body .ui-dialog .ui-dialog-content {
overflow-y:scroll; /* I made the scrollbar of modal visible */
}
</style>
<div id="createForm" class="ui-g-12">
<div class="ui-g form-group p-justify-between">
<!-- other stuff -->
</div>
</div>
scrollTop() {
//when I use this it works but scroll the body behind the popup instead of popup
$('html, body').animate({ scrollTop: $(document).height() }, 'slow');
//this does not work
$('html, body').animate({ scrollTop: $('#createForm').offset().top }, 'slow');
}