How to check with jquery if select has options and if it doesn't to disable it and show [not items]?
One way to do to it:
if ($('#myselect option').length == 0) {
$('#myselect').hide();
}
var $select = $('input:select option');
if(!$select.length )
$select.attr('disabled', true);
Or:
$('select:not(:has(option))').attr('disabled', true);
Another way to do it is simply use the jQuery has function
if ($('#myselect').has('option').length == 0)
{
// Hide and disable select input here
}
For information on the jQuery has function see: https://api.jquery.com/has/