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"; "use strict";
$('#Default').perfectScrollbar(); $('#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> </script>
</head> </head>
<body> <body>
@ -23,6 +28,11 @@
<div class="content"> <div class="content">
</div> </div>
</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> </body>
</html> </html>