Skip to content

Commit

Permalink
feat: 添加生成地址后跳转到地址位置
Browse files Browse the repository at this point in the history
  • Loading branch information
iHunterDev committed Apr 9, 2021
1 parent 45fafa5 commit f6238e7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ <h2>我来“帮你”进行搜索</h2>
// 显示结果
$('#resultArea').removeClass('invisible');

// 获取结果区域位置
var resultAreaOffset = $('#resultArea').offset();

// 跳转到结果区域
scrollTo({
top: resultAreaOffset.top,
behavior: "smooth"
});

// 取消默认操作
return false;
});
Expand Down

0 comments on commit f6238e7

Please sign in to comment.