Table row sequence Conversion Function (jquery)

Source: Internet
Author: User

I wrote a small function to change the table row sequence over the weekend and directly pasted the code.

The table is as follows:

Time details operation

Js Code, which will add class = danger after the change order for the row to be changed

<Script type = "text/javascript"> '. move_btn '). click (move_act = $ (). attr ('move _ act ''# test_table tbody tr '). removeClass ('danger '(move_act = 'up '). parent (). parent ('tr '). addClass ('danger '). parent (). parent ('tr' (move_act = 'low '). parent (). parent ('tr '). addClass ('danger '). parent (). parent ('tr' "$ ('# test_table tbody tr '). removeClass ('danger '); ", 2000 </script>

After the change, you can submit the new order according to the unique mark of each row.

Tucao: companies that shout "overtime" = "wolf" are not suitable for normal human survival. They regard "weekend overtime" as a promotion and comment on whether employees have a wolf.

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.