Created
August 31, 2017 00:24
-
-
Save fodra/bd9d4ec82de59958b7fc993f321a39dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ // Write on keyup event of keyword input element | |
+ $("#search").keyup(function(){ | |
+ _this = this; | |
+ // Show only matching TR, hide rest of them | |
+ $.each($("#teamTable tbody tr"), function() { | |
+ if($(this).text().toLowerCase().indexOf($(_this).val().toLowerCase()) === -1) | |
+ $(this).hide(); | |
+ else | |
+ $(this).show(); | |
+ }); | |
+ }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment