2014-11-06 03:02:00 +08:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
|
|
|
|
|
|
<title>perfect-scrollbar example</title>
|
2015-01-16 07:24:17 +08:00
|
|
|
<link href="../out/css/perfect-scrollbar.css" rel="stylesheet">
|
2014-11-06 03:02:00 +08:00
|
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
2015-01-16 07:24:17 +08:00
|
|
|
<script src="../out/js/perfect-scrollbar.js"></script>
|
2014-11-06 03:02:00 +08:00
|
|
|
<style>
|
|
|
|
#test {
|
|
|
|
border: 1px solid gray;
|
|
|
|
max-height: 300px;
|
|
|
|
width: 400px;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
#test .element {
|
|
|
|
margin: 1px;
|
|
|
|
background-color: #cec;
|
|
|
|
height: 44px;
|
|
|
|
line-height: 44px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function ($) {
|
|
|
|
var test = $('#test');
|
|
|
|
test.perfectScrollbar();
|
|
|
|
test.find('a').click(function () {
|
|
|
|
$(this).parent().remove();
|
|
|
|
test.perfectScrollbar('update');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="test" class="wrapper">
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
<div class='element'>Hello! Click <a href='#'>here</a> to remove this!</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|