Старт
This commit is contained in:
21
assets/plugins/jquery-scrollTo/tests/ElemMaxY-compat.html
Normal file
21
assets/plugins/jquery-scrollTo/tests/ElemMaxY-compat.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>jQuery.scrollTo - Test Element MaxY - Compat Mode</title>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
|
||||
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery.scrollTo - Test Element MaxY - Compat Mode</h1>
|
||||
|
||||
<div id="viewport" style="width:600px;height:500px;overflow: auto">
|
||||
<div id="ua" style="height:1500px; width:500px; padding:0 40px; background-color:#AAA">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#viewport').test();
|
||||
</script>
|
||||
</html>
|
||||
20
assets/plugins/jquery-scrollTo/tests/ElemMaxY-quirks.html
Normal file
20
assets/plugins/jquery-scrollTo/tests/ElemMaxY-quirks.html
Normal file
@ -0,0 +1,20 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>jQuery.scrollTo - Test Element MaxY - Quirks Mode</title>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
|
||||
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery.scrollTo - Test Element MaxY - Quirks Mode</h1>
|
||||
|
||||
<div id="viewport" style="width:600px;height:500px;overflow: auto">
|
||||
<div id="ua" style="height:1500px; width:500px; padding:0 40px; background-color:#AAA">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#viewport').test();
|
||||
</script>
|
||||
</html>
|
||||
19
assets/plugins/jquery-scrollTo/tests/WinMaxY-compat.html
Normal file
19
assets/plugins/jquery-scrollTo/tests/WinMaxY-compat.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>jQuery.scrollTo - Test Window MaxY - Compat Mode</title>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
|
||||
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery.scrollTo - Test Window MaxY - Compat Mode</h1>
|
||||
|
||||
<div id="ua" style="height:1500px; width:500px; padding:0 50px; background-color:#AAA">
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(window).test();
|
||||
</script>
|
||||
</html>
|
||||
18
assets/plugins/jquery-scrollTo/tests/WinMaxY-quirks.html
Normal file
18
assets/plugins/jquery-scrollTo/tests/WinMaxY-quirks.html
Normal file
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>jQuery.scrollTo - Test Window MaxY - Quirks Mode</title>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
|
||||
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery.scrollTo - Test Window MaxY - Quirks Mode</h1>
|
||||
|
||||
<div id="ua" style="height:1500px; width:500px; padding:0 50px; background-color:#AAA">
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(window).test();
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,20 @@
|
||||
<!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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>jQuery.scrollTo - Test Window MaxY to Iframe - Compat Mode</title>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
|
||||
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery.scrollTo - Test Window MaxY to Iframe - Compat Mode</h1>
|
||||
|
||||
<iframe src="WinMaxY-compat.html?notest" style="width:500px" /></iframe>
|
||||
|
||||
<script type="text/javascript">
|
||||
setTimeout(function(){
|
||||
$('iframe').test();
|
||||
}, 1500 );
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,19 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>jQuery.scrollTo - Test Window MaxY to Iframe - Quirks Mode</title>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script>
|
||||
<script type="text/javascript" src="../jquery.scrollTo.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery.scrollTo - Test Window MaxY to Iframe - Quirks Mode</h1>
|
||||
|
||||
<iframe src="WinMaxY-quirks.html?notest" style="width:500px"></iframe>
|
||||
|
||||
<script type="text/javascript">
|
||||
setTimeout(function(){
|
||||
$('iframe').test();
|
||||
}, 1500 );
|
||||
</script>
|
||||
</html>
|
||||
@ -0,0 +1,11 @@
|
||||
<!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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>jQuery.scrollTo - Test Window MaxY with Iframe - Compat Mode</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery.scrollTo - Test Window MaxY with Iframe - Compat Mode</h1>
|
||||
|
||||
<iframe src="WinMaxY-compat.html" />
|
||||
</html>
|
||||
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>jQuery.scrollTo - Test Window MaxY with Iframe - Quirks Mode</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery.scrollTo - Test Window MaxY with Iframe - Quirks Mode</h1>
|
||||
|
||||
<iframe src="WinMaxY-quirks.html" />
|
||||
</html>
|
||||
24
assets/plugins/jquery-scrollTo/tests/index.html
Normal file
24
assets/plugins/jquery-scrollTo/tests/index.html
Normal file
@ -0,0 +1,24 @@
|
||||
<!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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>jQuery.scrollTo Tests</title>
|
||||
<meta name="keywords" content="javascript, jquery, plugins, scroll, scrollTo, smooth, animation, to, effect, ariel, flesler, window, overflow, element, navigation, customizable" />
|
||||
<meta name="description" content="Tests for jQuery ScrollTo. Made by Ariel Flesler." />
|
||||
<meta name="robots" content="index,follow" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>jQuery.scrollTo Tests</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="WinMaxY-compat.html">Max window scrolling (compat mode)</a></li>
|
||||
<li><a href="WinMaxY-quirks.html">Max window scrolling (quirks mode)</a></li>
|
||||
<li><a href="ElemMaxY-compat.html">Max element scrolling (compat mode)</a></li>
|
||||
<li><a href="ElemMaxY-quirks.html">Max element scrolling (quirks mode)</a></li>
|
||||
<li><a href="WinMaxY-with-iframe-compat.html">Max window scrolling, within an iframe (compat mode)</a></li>
|
||||
<li><a href="WinMaxY-with-iframe-quirks.html">Max window scrolling, within an iframe (quirks mode)</a></li>
|
||||
<li><a href="WinMaxY-to-iframe-compat.html">Max iframe scrolling from outside (compat mode)</a></li>
|
||||
<li><a href="WinMaxY-to-iframe-quirks.html">Max iframe scrolling from outside (quirks mode)</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
21
assets/plugins/jquery-scrollTo/tests/test.js
vendored
Normal file
21
assets/plugins/jquery-scrollTo/tests/test.js
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
$.fn.test = function(){
|
||||
// Hide title on iframes
|
||||
if (window.self !== window.top) {
|
||||
$('h1').hide();
|
||||
}
|
||||
|
||||
if (location.search === '?notest') {
|
||||
return this;
|
||||
}
|
||||
|
||||
$.scrollTo.defaults.axis = 'xy';
|
||||
|
||||
var root = this.is('iframe') ? this.contents() : $('body');
|
||||
root.find('#ua').html(
|
||||
navigator.userAgent +
|
||||
'<br />' +
|
||||
'document.compatMode is "' + document.compatMode + '"'
|
||||
);
|
||||
|
||||
return this.scrollTo('max', 1000).scrollTo(0, 1000);
|
||||
};
|
||||
Reference in New Issue
Block a user