Html ListBox
Invoke the ensureVisible method of the jqxListBox. Author: http://jqwidgets.com
by jqwidgets
HTML
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<div id='jqxListBox'></div>
<div>
<input style="margin-top: 20px;" type="button" id='jqxButton' value="Go to the seventh element" />
</div>
JavaScript
var source = [
"Affogato",
"Americano",
"Bicerin",
"Breve",
"Café Bombón",
"Café au lait",
"Caffé Corretto",
"Café Crema",
"Affogato",
"Americano",
"Bicerin",
"Breve",
"Café Bombón",
"Café au lait",
"Caffé Corretto",
"Café Crema",
"Caffé Latte"];
// Create a jqxListBox
$("#jqxListBox").jqxListBox({
source: source,
theme: 'energyblue',
width: '200px',
height: '250px'
});
$("#jqxButton").jqxButton({
theme: 'energyblue'
});
$("#jqxListBox").jqxListBox('disableAt', 2);
$('#jqxButton').on('click', function () {
$("#jqxListBox").jqxListBox('ensureVisible', source.length - 1);
});