m站设置锚点跳转到指定位置
来源:互联网 发布:三维点云数据曲面拟合 编辑:程序博客网 时间:2024/04/29 23:32
gotoAnchor:function(options){
var anchor = options.el;
var $body = window.document.documentElement;
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("webkit") > -1) {
$body = window.document.body;
}
var pos = anchor.offset();
$body.scrollTop = pos.top - 50;
}
var anchor = options.el;
var $body = window.document.documentElement;
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("webkit") > -1) {
$body = window.document.body;
}
var pos = anchor.offset();
$body.scrollTop = pos.top - 50;
}
调用:
$(".link1").click(function(){
that.gotoAnchor({el:$('#top1')});
})
that.gotoAnchor({el:$('#top1')});
})
0 0
- m站设置锚点跳转到指定位置
- 跳转到页面的指定位置, 锚点平滑跳转
- 跳转到指定位置
- 跳转到指定位置
- jsp页面跳转到指定锚点
- 点击跳转到指定位置
- 跳转到网页的指定位置
- js 滚动/跳转页面到指定位置
- 点击页面链接跳转到指定位置
- jquery同一页面跳转到指定位置
- html 跳转到本页面指定位置
- ios 跳转到地图指定位置
- jquery实现跳转到页面指定位置
- jquery同一页面跳转到指定位置
- jquery 仿锚点跳转到页面指定位置
- 点击跳转到页面指定位置
- angularJs中跳转到指定的锚点详解($anchorScroll)
- 实现页面内的指定位置跳转 HTML标记语言:锚点的使用
- 解决5.0以上新TimePicker不触发setOnTimeChangedListener
- 求零幺字符串的最长子串的长度——利用状态图解决
- App服务化, 10倍增长,你想知道的都在这里了!
- Matlab中对矩阵使用矩阵尺寸的索引
- iOS 问题收集及处理 (弃用方法收集)持续更新中(warning,errors)
- m站设置锚点跳转到指定位置
- iOS-Core-Animation-Advanced-Techniques(四)
- UVA 1329——Corporative Network
- android mediaplayer相关
- 选择排序法
- 什么是泛域名解析
- iOS开发之iOS与js的交互
- 快速掌握Lua 5.3 —— 从Lua中调用C函数
- springMVC—接受参数以及返回参数