| 447 | <script type="text/javascript"> |
| 448 | jQuery("#plugin-search-input").keyup(function(){ |
| 449 | |
| 450 | // Retrieve the input field text and reset the count to zero |
| 451 | var filter = $(this).val() |
| 452 | |
| 453 | // Loop through the comment list |
| 454 | $("#the-list tr").each(function(){ |
| 455 | |
| 456 | // If the list item does not contain the text phrase fade it out |
| 457 | if ($(this).text().search(new RegExp(filter, "i")) < 0) { |
| 458 | $(this).fadeOut(100); |
| 459 | |
| 460 | // Show the list item if the phrase matches and increase the count by 1 |
| 461 | } else { |
| 462 | $(this).show(); |
| 463 | |
| 464 | } |
| 465 | }); |