利用jQuery实现让容器的滚动条滚动到某个内部元素的位置。让内部元素本来在中间,一下子跑到最上面
<ul class="parent" style="height:50px;overflow:auto"> |
$('.parent').scrollTop( |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment
<ul class="parent" style="height:50px;overflow:auto"> |
$('.parent').scrollTop( |