diff --git a/src/_includes/icons/filter.html b/src/_includes/icons/filter.html
index a41157963..bf656f4ad 100644
--- a/src/_includes/icons/filter.html
+++ b/src/_includes/icons/filter.html
@@ -5,10 +5,10 @@
<{% if page.navbar_active == "icons" %}div{% else %}section{% endif %} id="filter">
diff --git a/src/assets/js/site.js b/src/assets/js/site.js
index 38b6eb07b..3254a0282 100644
--- a/src/assets/js/site.js
+++ b/src/assets/js/site.js
@@ -21,13 +21,19 @@ $(function() {
arrowKeys: true
});
- $clear.click(function(e) {
+ $clear.on('click', function(e) {
e.preventDefault();
- $filter_by.val('').trigger('keyup').focus();
+ $filter_by
+ .val('')
+ .trigger('input')
+ .trigger('keyup')
+ .focus();
+
+ $clear.addClass('gone'); // Hide clear button
});
- $filter_by.keyup(function() {
+ $filter_by.on('keyup', function() {
var $this = $(this);
var val = $this.val().toLowerCase();
$filter.toggle(!!val);
@@ -57,7 +63,7 @@ $(function() {
} else {
$no_results.hide();
}
- }).trigger('keyup');
+ });
}
function inFilter(val, filter) {