Widgets > wijsuperpanel > wijsuperpanel How To > Enable Client-Side Scrolling |
You can use code simlilar to the following to enable client-side scrolling:
<script id="scriptInit" type="text/javascript">
$(function () {
$("#superPanel").wijsuperpanel();
});
function scroll(x, y) {
try {
var x = parseInt($('#inputX').val());
var y = parseInt($('#inputY').val());
}
catch (e) {
return;
}
$("#superPanel").wijsuperpanel('scrollTo', x, y);
}
</script>
<div class="demo-options">
<!-- Begin options markup -->
<label for="inputX">
X positon
</label>
<input type="text" id="inputX" value="100" />
<label for="inputY">
Y position
</label>
<input type="text" id="inputY" value="100" />
<input type="button" id="doScroll" value="Scroll" onclick="scroll()" />
<!-- End options markup -->
</div>