mirror of
https://github.com/ForkAwesome/Fork-Awesome
synced 2024-06-02 22:02:31 +02:00
Adding a debounce
This commit is contained in:
parent
82248f0f01
commit
fa67ccd0a3
|
@ -1,7 +1,6 @@
|
|||
$(function() {
|
||||
var SearchView = Backbone.View.extend({
|
||||
events: {
|
||||
"keyup #search-input": "search",
|
||||
"click #search-clear": "clear"
|
||||
},
|
||||
|
||||
|
@ -15,6 +14,7 @@ $(function() {
|
|||
this.$searchInputClear = this.$("#search-clear");
|
||||
this.$iconsSection = this.$("#icons");
|
||||
|
||||
this.$searchInput.on("keyup", _.debounce(_.bind(this.search, this), 200));
|
||||
this.algoliaHelper.on("result", _.bind(this.showResults, this));
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue