jquery.searchableSelect.js 第10行代码完善
return $(elem).text().toUpperCase().indexOf(arg == null ? "" : arg.toUpperCase()) >= 0;
$("#test").next(".searchable-select").children(".searchable-select-holder").bind('DOMNodeed', function(e) { var selectValue = $(this).next(".searchable-select-down").children(".searchable-scroll").children(".searchable-select-items").children(".selected").attr("data-value"); });
加注释那两句就完美解决问题,在评论区找到答案,哈哈哈
show: function() { this.down.removeClass('searchable-select-hide'); this.input.focus(); this.status = 'show'; this.setPriviousAndNextVisibility(); this.down.css('z-index', 100); //打开下拉列表时调高z-index层级 }, hide: function() { if (!(this.status === 'show')) return; if (this.items.find(':not(.searchable-select-hide)').length === 0) this.input.val(''); this.down.addClass('searchable-select-hide'); this.searchableElement.trigger('focus'); this.status = 'hide'; this.down.css('z-index', 1); //关闭下拉列表时恢复z-index层级 },