I am dynamically grabbing data from my DB by using the jQuery .getJSON function and append the data to an html select drop-down list. My JS code is as follows:
$.getJSON('url',
function(data) {
var html = '<option value="">--Please select one--</option>';
var len = data.length;
for (var i = 0; i < len; i++) {
html += '<option value="' + data[i].name + '">' + '</option>';
}
html += '</option>';
$('#names').html(html);
});
My html:
<select id="names"></select>
This works fine it starts look like this after the page loads:

What I want to do is after the user click the select option and choose one of the available options from the list, I want to disable the --Please select one-- option so that the user will be forced to choose a meaningful name not go back to --Please select one--
I checked online and all I found was solutions for hard-coded drop-down select. Can you please give some advise?