Html5 DropDownList

Set the selectionRenderer property of the jqxDropDownButton. Author: http://jqwidgets.com Author: http://jqwidgets.com

by jqwidgets

HTML

<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div id='jqxDropDownList'></div>

JavaScript

var names = ["Nancy", "Andrew", "Janet", "Margaret", "Steven", "Michael", "Robert", "Laura", "Anne"];


$('#jqxDropDownList').jqxDropDownList({
    theme: 'energyblue',
    source: names,
    height: 25,
    width: 270,
    selectionRenderer: function () {
        var item = $('#jqxDropDownList').jqxDropDownList('getSelectedItem');
        if (item) {
            return "<b>" + item.label + "</b>";

        }
        return "<b>Please Choose:</b>";
    }
});;