Skip to content Skip to sidebar Skip to footer

Have Code Which Is Filtering/displaying Parts Of Tables. Would Like To Know How To Filter Whole Tables As One?

I have managed to integrate a couple of code snippets with some success. I have a query/input on my page, only when the searched words/titles are entered the returned displayed res

Solution 1:

So I only have a little bit of time, so i can only help with part of what you're asking. I know a simple change to part of the code that could prevent highlighting when there is only 1 letter typed.

$(document).ready(function init() {
  input = document.getElementById('myInput');
  noMatches = document.getElementById('noMatches');
  table = document.getElementById('myTable');
  rows = table.querySelectorAll('tr');
  markInstance = new Mark(table);

  ContactsearchFX = ContactsearchFX.bind(input) 
  input.addEventListener('keyup', _.debounce(ContactsearchFX, 250));
});



function ContactsearchFX() {
    if(this.contextText.length > 1){
        resetContent();
        markInstance.unmark({ done: highlightMatches });
    }
}

Post a Comment for "Have Code Which Is Filtering/displaying Parts Of Tables. Would Like To Know How To Filter Whole Tables As One?"