@@ -496,16 +496,14 function observeSearchfield(fieldId, targetId, url) { | |||
|
496 | 496 | var val = $this.val(); |
|
497 | 497 | if ($this.attr('data-value-was') != val){ |
|
498 | 498 | $this.attr('data-value-was', val); |
|
499 | if (val != '') { | |
|
500 | $.ajax({ | |
|
501 |
|
|
|
502 | type: 'get', | |
|
503 | data: {q: $this.val()}, | |
|
504 | success: function(data){ $('#'+targetId).html(data); }, | |
|
505 |
|
|
|
506 | complete: function(){ $this.removeClass('ajax-loading'); } | |
|
507 | }); | |
|
508 | } | |
|
499 | $.ajax({ | |
|
500 | url: url, | |
|
501 | type: 'get', | |
|
502 | data: {q: $this.val()}, | |
|
503 | success: function(data){ $('#'+targetId).html(data); }, | |
|
504 | beforeSend: function(){ $this.addClass('ajax-loading'); }, | |
|
505 | complete: function(){ $this.removeClass('ajax-loading'); } | |
|
506 | }); | |
|
509 | 507 | } |
|
510 | 508 | }; |
|
511 | 509 | var reset = function() { |
General Comments 0
You need to be logged in to leave comments.
Login now