页面跳转到指定锚点

JS
var id = "#companyName" + $scope.CN;
$("html, body").animate({scrollTop: $(id).offset().top - 100}, {duration: 500, easing: "swing"});

HTML
<div id="companyName{{ranking.riskCode}}" ng-repeat="ranking in rankings">
<div class="pad2">
<div class="bxj-tit f4">{{ranking.riskCompany}}</div>
<div class="c5 f2">标保单位:万元</div>
<table class="bxj-table c5">
<tr>
<th>排 名</th><th>省级平台</th><th>代理人姓名</th><th>标 保</th>
</tr>
<tr ng-repeat="standard in ranking.standardPersonList">
<td>{{standard.ranking}}</td>
<td>{{standard.province}}</td>
<td>{{standard.agentname}}</td>
<td>{{standard.standard}}</td>
</tr>
</table>
</div>
</div>
posted @ 2018-11-22 09:56  陪我一起去看海  阅读(253)  评论(0编辑  收藏  举报