$("#example thead th input[type=text]").on( 'keyup change', function () { //...filtering $(this).blur(); $(this).focus(); });