jquery Deletes an implementation example of an HTML table row by clicking a row _jquery

Source: Internet
Author: User

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.

$ (document). Ready (function () {
$ ("#sample tr"). Click (function () {
//change the background color to red before Removing
$ (this). 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.