diff --git a/index.html b/index.html index 746e834..7e090df 100755 --- a/index.html +++ b/index.html @@ -215,8 +215,7 @@

<select>

- diff --git a/js/jcf.select.js b/js/jcf.select.js index 610b4f3..93ad7da 100644 --- a/js/jcf.select.js +++ b/js/jcf.select.js @@ -388,7 +388,8 @@ selectedOption = this.realElement.prop('options')[selectedIndex], selectedOptionImage = selectedOption ? selectedOption.getAttribute('data-image') : null, selectedOptionText = '', - selectedOptionClasses; + selectedOptionClasses, + self = this; if (this.realElement.prop('multiple')) { $.each(this.realElement.prop('options'), function(index, option) { @@ -396,6 +397,9 @@ selectedOptionText += (selectedOptionText ? ', ' : '') + option.innerHTML; } }); + if (!selectedOptionText) { + selectedOptionText = self.realElement.attr('placeholder') || ''; + } this.selectText.removeAttr('class').html(selectedOptionText); } else if (!selectedOption) { if (this.selectImage) {