Add update functionality to options-default example.
It's useful to test the plugin with the update function.
This commit is contained in:
parent
babd3949c7
commit
22bffa9ba8
@ -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>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user