Skip to content

Commit

Permalink
Submit search form on select in ac
Browse files Browse the repository at this point in the history
  • Loading branch information
martent committed Jan 28, 2014
1 parent 2e50fbe commit 49912ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/javascripts/autocomplete.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ $ ->
}
minLength: 2
select: (event, ui) ->
document.location = $("#full-search").attr('action') + '?q=' + unescape(ui.item.value)
$searchField.val(ui.item.value)
$('#full-search').submit()
.data( "ui-autocomplete" )._renderItem = (ul, item) ->
return $("<li></li>")
.data("ui-autocomplete-item", item)
Expand Down

0 comments on commit 49912ee

Please sign in to comment.