jqwidgets-framework
Version:
jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.
70 lines (64 loc) • 3.43 kB
HTML
<html lang="en">
<head>
<title id='Description'>In this demo is demonstrated how to change the DropDown's vertical alignment.
</title>
<link rel="stylesheet" href="../../../jqwidgets/styles/jqx.base.css" type="text/css" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" />
<script type="text/javascript" src="../../../scripts/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="../../../scripts/demos.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxdata.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxbuttons.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxscrollbar.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxlistbox.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxdropdownlist.js"></script>
<script type="text/javascript" src="../../../jqwidgets/jqxradiobutton.js"></script>
</head>
<body>
<div id='content'>
<script type="text/javascript">
$(document).ready(function () {
var url = "../../sampledata/customers.txt";
// prepare the data
var source =
{
datatype: "json",
datafields: [
{ name: 'CompanyName' },
{ name: 'ContactName' }
],
id: 'id',
url: url,
async: false
};
var dataAdapter = new $.jqx.dataAdapter(source);
// Create a jqxDropDownList
$("#jqxWidget").jqxDropDownList({ selectedIndex: 0, source: dataAdapter, dropDownVerticalAlignment: 'top', displayMember: "ContactName", valueMember: "CompanyName", dropDownWidth: 200, width: 150, height: 25});
$("#topAlign").jqxRadioButton();
$("#bottomAlign").jqxRadioButton();
$("#bottomAlign").on('checked', function () {
$("#jqxWidget").jqxDropDownList({ dropDownVerticalAlignment: 'bottom' });
});
$("#topAlign").on('checked', function () {
$("#jqxWidget").jqxDropDownList({ dropDownVerticalAlignment: 'top' });
});
});
</script>
<div>
<div style='float: left; margin-top: 270px;' id='jqxWidget'>
</div>
<div style="float: left; margin-left: 100px; margin-top:270px; font-size: 13px; font-family: Verdana;" id="selectionlog">
<h3>
Alignment</h3>
<input type="radio" id='topAlign' checked />Top
<input type="radio" id="bottomAlign" />Bottom
</div>
</div>
</div>
<div style="position: absolute; bottom: 5px; right: 5px;">
<a href="https://www.jqwidgets.com/" alt="https://www.jqwidgets.com/"><img alt="https://www.jqwidgets.com/" title="https://www.jqwidgets.com/" src="https://www.jqwidgets.com/wp-content/design/i/logo-jqwidgets.png"/></a>
</div>
</body>
</html>