Skip to content

Commit

Permalink
Merge pull request hasgeek#315 from hasgeek/keyword_autocomplete
Browse files Browse the repository at this point in the history
Keyword autocomplete
  • Loading branch information
jace committed Mar 31, 2016
2 parents 2805d38 + 0112989 commit 6ed1f2f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hasjob/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,13 @@ window.Hasjob.Filters = {
window.Hasjob.StickieList.refresh();
});

var lastKeyword = '';
$('.js-handle-keyword-update').on('keyup', function(){
window.clearTimeout(keywordTimeout);
keywordTimeout = window.setTimeout(window.Hasjob.StickieList.refresh, 500);
if ($(this).val() !== lastKeyword){
window.clearTimeout(keywordTimeout);
lastKeyword = $(this).val();
keywordTimeout = window.setTimeout(window.Hasjob.StickieList.refresh, 1000);
}
});

$('#job-filters-location').multiselect({
Expand Down

0 comments on commit 6ed1f2f

Please sign in to comment.