jquery has become one of the most popular and favorite JavaScript frameworks of all time. Not only does it not reduce the simple technical overhead of coding in JavaScript, but it also makes your code Cross-browser compatible. I've written a lot about the jquery tutorial, and this time, I've also used this simple pure implementation. The task is to use some stylish effects from an HTML table, just click the row of the line. Here is the jquery code to achieve this goal.
1 2 3 4 5 6 7 8 9 |
$ (document). Ready (function () {$ ("#sample tr"). Click (function () {//change the background color to red before removing $ (t His). CSS ("Background-color", "#FF3700"); $ (this). Fadeout (a function () {$ (this). Remove ();}); }); }); |
In the above code, we all have handlers for all of the "TR" in the "# example" table. Click on it, we first change the background of the row, and then fade it and delete it. This is a simple task.