Jump to content

Highlight Filter result


Hansiebebe
 Share

Recommended Posts

Hi,

I am using this script, and the filter works fine.

But i also would like to highlight the text , is this possible in one function ?

 

<script>
$(document).ready(function(){
$("#sInput").on("keyup", function() {    var value = $(this).val().toLowerCase(); 
    $("#grepobody tr").filter(function() {
      $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
    });
  });
});
</script>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...