Understanding this jQuery filter function -


I'm stuck at the following code which searches for a htmltable but is unable to understand it The line can explain

  (function ($) {$ ('# filter'). Keyup (function () {var rex = new RegExp ($ (this) .val (), ' $ '(' Employee Employee '). $ (' Employee Employee '). $ (' Employee Employee '). Filter (function () {return rex.test ($ (this) .text ());}). Show ( );})}} (JQuery));   

In addition, there are about 1000 rows in my table. According to the performance, are you looking at whether I use this code? Line 3: When a key is released (when you take your finger from key)

line 3: when a key is released (when you take your finger from key)

Line 5: Creates a regular expression object that matches the string that is written in the filter input box. Line 6: Every employee hides the line

Line 7-9: Every employee takes the line and applies a filter. Function within the filter on every line of the employee table. Applies and provides true or false text based on whether its text matches the regular expression (which is using the value from the filter input.) After all the results of the filter returned to the truth. Show Called.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -