To use some fashionable effects from an HTML table, you only need to click the row and change the row to delete it. This example is relatively simple, new friends can learn about jQuery, which has become one of the most common and favorite JavaScript frameworks at all times. It not only reduces the technical overhead of simple JavaScript encoding, but also makes your code cross-browser compatible. I have already written many jQuery tutorials. At this time, I also use this simple pure implementation. The task is to use some trendy effects from an HTML table, as long as you click the row of the row. The following is the jQuery code to achieve this goal.
$ (Document ). ready (function () {$ ("# sample tr "). click (function () {// change the background color to red before removing((this).css ("background-color", "# FF3700"); $ (this ). fadeOut (400, function () {$ (this ). remove ();});});});
In the above Code, we have attached all the "TR" handlers in the "# example" table. Next, we first change the background of the row, then fade out and delete it. This is a simple task.