New users seek help to create such a webpage

Source: Internet
Author: User
For help, new users want to create such a webpage shift card. when 1 # Double-click turns red and jumps to the back, the other column 1 # All fades down! After double-clicking the blacklist, other columns will also become black! Each number represents an employee. Which environment is better for implementation!


Reply to discussion (solution)

This requirement is suitable for jquery... for web developers, you should call dom operations.

When you click any number

First statement: current 1 # turns red, other 1 # Changes Gray
The second statement: the current 1 # Move to the fifth column of the other forward replenishment

Because I don't know your dom structure, I assume that

$ ("Td "). click (function () {// var con = $ (this) when a td is clicked ). text (); // Obtain the vertex (this).css ("color", "red"); // The current vertex becomes red, $ ("td: contains ('"+ con +"') ").not(this).css (" color "," gray "); // Non-current ash of the same content $ (this ). siblings (). last (). after ($ (this ). clone (); // copy the current node to the last $ (this ). remove (); // delete the current node });



WOWing at night... it's hard to give you a general idea.

This requirement is suitable for jquery... for web developers, you should call dom operations.

When you click any number

First statement: current 1 # turns red, other 1 # Changes Gray
The second statement: the current 1 # Move to the fifth column of the other forward replenishment

Because I don't know your dom structure, I assume that

$ ("Td "). click (function () {// var con = $ (this) when a td is clicked ). text (); // Obtain the vertex (this).css ("color", "red"); // The current vertex becomes red, $ ("td: contains ('"+ con +"') ").not(this).css (" color "," gray "); // Non-current ash of the same content $ (this ). siblings (). last (). after ($ (this ). clone (); // copy the current node to the last $ (this ). remove (); // delete the current node });



WOWing at night... it's hard to give you a general idea.

Thank you! Can I do one for me?

Use JS as the front-end. each number is a DIV, and a DIV is given to a separate ID, and a DIV with the same number is given to the same class.
After double-clicking, all other divs with the same name as this class become gray, and then assign a red color to the double-clicked divs separately.
As for the moving effect, the DIV width is the same, so you can directly change the distance from the left.

Use JS as the front-end. each number is a DIV, and a DIV is given to a separate ID, and a DIV with the same number is given to the same class.
After double-clicking, all other divs with the same name as this class become gray, and then assign a red color to the double-clicked divs separately.
As for the moving effect, the DIV width is the same, so you can directly change the distance from the left.
I can't cook any more! The website will be built! I did not really learn the source code for less than a week. I learned a lot about the materials, and I got a big start! Can I learn from it directly?

Well, I saw your Insite email and wrote a demo for you.

Http://www.colg.biz/demo/d2.html

According to your needs
When 1 # Double-click to jump to the back, the other column 1 # all become dimmed! After double-clicking the blacklist, other columns will also become black!

All code

   New Document  
   
   
   
   
 Test

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.