Add update functionality to options-default example.

It's useful to test the plugin with the update function.
This commit is contained in:
Hyunje Alex Jun 2014-09-15 14:05:34 +01:00
parent babd3949c7
commit 22bffa9ba8

View File

@ -16,6 +16,11 @@
"use strict";
$('#Default').perfectScrollbar();
});
var updateSize = function () {
var width = parseInt($('#width').val(), 10);
var height = parseInt($('#height').val(), 10);
$('#Default').width(width).height(height).perfectScrollbar('update');
};
</script>
</head>
<body>
@ -23,6 +28,11 @@
<div class="content">
</div>
</div>
<p style='text-align: center'>
Width <input type='text' id='width' value='600'>
Height <input type='text' id='height' value='400'>
<button onclick='updateSize()'>Change!</button>
</p>
</body>
</html>