/** * PrimeUI dropdown widget */ $(function() { $.widget("primeui.puidropdown", { options: { effect: 'fade', effectSpeed: 'normal', filter: false, filterMatchMode: 'startsWith', caseSensitiveFilter: false, filterFunction: null, source: null, content: null, scrollHeight: 200 }, _create: function() { if(this.options.source) { for(var i = 0; i < this.options.source.length; i++) { var choice = this.options.source[i]; if(choice.label) this.element.append(''); else this.element.append(''); } } this.element.wrap('
') .wrap('
'); this.container = this.element.closest('.pui-dropdown'); this.focusElementContainer = $('
').appendTo(this.container); this.focusElement = this.focusElementContainer.children('input'); this.label = this.options.editable ? $('') : $('