         ul.append $('<li>').append(link).data 'ui-autocomplete-item', item
 
     makeBadge: (color) ->
-        badge = $('<span class="badge combobox-badge">')
-        .html('&nbsp;')
-        .css('backgroundColor', color)
-        .css('cursor', 'pointer')
+        badge = $ '<span class="badge combobox-badge">'
+        .html '&nbsp;'
+        .css 'backgroundColor', color
+        .css 'cursor', 'pointer'
         .click @openMenu
 
         if @small

        @$el.addClass 'combobox'
        @small = options.small

        @autocompleteWidget = @$el.data('ui-autocomplete')
        @autocompleteWidget._renderItem = @renderItem

        isInput = @$el[0].nodeName.toLowerCase() is 'input'


    onSelect: (ev, ui) =>
        @$el.blur().removeClass 'expanded'
        @updateBadge ev, ui

    updateBadge: (ev, ui) =>
        @badge?.remove()
