jQuery MiniUI
标题:
引用了miniui就得不到body的横向滚动条位置了?
[打印本页]
作者:
julianzhu1117
时间:
2014-12-12 15:42:29
标题:
引用了miniui就得不到body的横向滚动条位置了?
页面明明有横向滚动条,但是引用了miniui的js后就算有横向滚动条但获取的值永远是0?
$(document).scrollLeft()
作者:
dforce
时间:
2014-12-12 15:56:29
[attach]5654[/attach]
如图,可获取
作者:
julianzhu1117
时间:
2014-12-12 16:08:08
dforce 发表于 2014-12-12 15:56
如图,可获取
我是像下面这样,去掉boot.js就可以正常
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="Scripts/jquery-1.11.0.min.js"></script>
<script src="Scripts/boot.js"></script>
</head>
<body style="overflow-x:auto">
<div style="width:3000px;height:500px;background:#ccc" onclick="showNum()">
123
</div>
</body>
</html>
<script>
function showNum() {
alert($(document).scrollLeft());
}
</script>
作者:
julianzhu1117
时间:
2014-12-12 16:09:07
为什么一引用了miniui就不行了?
作者:
dforce
时间:
2014-12-12 16:22:11
julianzhu1117 发表于 2014-12-12 16:09
为什么一引用了miniui就不行了?
[attach]5656[/attach]
如图,未发现问题
请提供完整html页面来重现你的问题
作者:
julianzhu1117
时间:
2014-12-12 16:33:14
找到原因了,原来有人添加了以下css造成的
html, body
{
margin: 0;
padding: 0px;
border: 0;
width: 100%;
height: 100%;
overflow: hidden
}
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2