diff --git a/public/javascripts/application.js b/public/javascripts/application.js index c2b1a893c..78dc1e3ab 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -478,16 +478,14 @@ function observeSearchfield(fieldId, targetId, url) { var val = $this.val(); if ($this.attr('data-value-was') != val){ $this.attr('data-value-was', val); - if (val != '') { - $.ajax({ - url: url, - type: 'get', - data: {q: $this.val()}, - success: function(data){ $('#'+targetId).html(data); }, - beforeSend: function(){ $this.addClass('ajax-loading'); }, - complete: function(){ $this.removeClass('ajax-loading'); } - }); - } + $.ajax({ + url: url, + type: 'get', + data: {q: $this.val()}, + success: function(data){ $('#'+targetId).html(data); }, + beforeSend: function(){ $this.addClass('ajax-loading'); }, + complete: function(){ $this.removeClass('ajax-loading'); } + }); } }; var reset = function() {