mirror of https://github.com/lukechilds/docs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.9 KiB
64 lines
1.9 KiB
<!DOCTYPE html>
|
|
<html lang="en-gb" dir="ltr">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Scroll - UIkit tests</title>
|
|
<script src="js/test.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="uk-container">
|
|
|
|
<h1>Scroll</h1>
|
|
|
|
<a class="uk-button uk-button-default" href="#bottom" uk-scroll>Go Down!</a>
|
|
<a id="js-top-callback" class="uk-button uk-button-default" href="#bottom" uk-scroll>Go Down with callback!</a>
|
|
|
|
<div style="height: 2000px;"></div>
|
|
|
|
<a id="bottom" class="uk-button uk-button-default" href="#" uk-scroll>Go Up!</a>
|
|
|
|
<script>
|
|
|
|
UIkit.util.on('#js-top-callback', 'scrolled', function () {
|
|
alert('Done.');
|
|
});
|
|
|
|
</script>
|
|
|
|
<h2>JavaScript Options</h2>
|
|
|
|
<div class="uk-overflow-auto">
|
|
<table class="uk-table uk-table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Option</th>
|
|
<th>Value</th>
|
|
<th>Default</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>duration</code></td>
|
|
<td>Number</td>
|
|
<td>1000</td>
|
|
<td>The animation duration.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>offset</code></td>
|
|
<td>Number</td>
|
|
<td>0</td>
|
|
<td>Offset added to scroll top.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
|