2015-01-27 00:32:33 +08:00
|
|
|
<!DOCTYPE html>
|
2013-06-08 18:04:02 +08:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
2013-09-30 14:41:09 +08:00
|
|
|
<title>perfect-scrollbar example</title>
|
2015-02-13 03:56:27 +08:00
|
|
|
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet">
|
2015-02-13 04:08:09 +08:00
|
|
|
<script src="../dist/js/perfect-scrollbar.js"></script>
|
2013-06-08 18:04:02 +08:00
|
|
|
<style>
|
|
|
|
#description {
|
|
|
|
border: 1px solid gray;
|
|
|
|
height:150px;
|
|
|
|
width: 400px;
|
2015-02-21 20:53:42 +08:00
|
|
|
overflow: auto;
|
2015-02-06 02:57:33 +08:00
|
|
|
position: relative;
|
2013-06-08 18:04:02 +08:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="description" class="wrapper">
|
2015-02-06 02:57:33 +08:00
|
|
|
<p>The command takes options applicable</p>
|
|
|
|
<p>The command takes options applicable</p>
|
|
|
|
<p>The command takes options applicable</p>
|
|
|
|
<p>The command takes options applicable</p>
|
|
|
|
<p>The command takes options applicable</p>
|
|
|
|
<p>The command takes options applicable</p>
|
|
|
|
<p>The command takes options applicable</p>
|
|
|
|
<p>The command takes options applicable</p>
|
|
|
|
<p>The command takes options applicable</p>
|
|
|
|
<p>The command takes options applicable</p>
|
2013-06-08 18:04:02 +08:00
|
|
|
</div>
|
2015-02-06 02:57:33 +08:00
|
|
|
<button id='redraw'>Redraw</button>
|
2015-01-27 00:32:33 +08:00
|
|
|
<script>
|
|
|
|
var $ = document.querySelector.bind(document);
|
|
|
|
window.onload = function () {
|
|
|
|
Ps.initialize($('#description'));
|
|
|
|
};
|
2015-02-06 02:57:33 +08:00
|
|
|
$('#redraw').addEventListener('click', function () {
|
|
|
|
var oldHtml = $('#description').innerHTML;
|
|
|
|
$('#description').innerHTML = '';
|
|
|
|
setTimeout(function () {
|
|
|
|
$('#description').innerHTML = '' +
|
|
|
|
'<p>The command takes options applicable</p>' +
|
|
|
|
'<p>The command takes options applicable</p>' +
|
|
|
|
'<p>The command takes options applicable</p>' +
|
|
|
|
'<p>The command takes options applicable</p>' +
|
|
|
|
'<p>The command takes options applicable</p>' +
|
|
|
|
'<p>The command takes options applicable</p>' +
|
|
|
|
'<p>The command takes options applicable</p>' +
|
|
|
|
'<p>The command takes options applicable</p>' +
|
|
|
|
'<p>The command takes options applicable</p>' +
|
|
|
|
'<p>The command takes options applicable</p>';
|
|
|
|
Ps.update($('#description'));
|
|
|
|
}, 500);
|
|
|
|
});
|
2015-01-27 00:32:33 +08:00
|
|
|
</script>
|
2013-06-08 18:04:02 +08:00
|
|
|
</body>
|
|
|
|
</html>
|