Using jquery, move the mouse to the table to change color.

Source: Internet
Author: User
Using jquery, move the mouse to the table to change color.

Keywords: jquery implementation, move the mouse to the table color effect

I use a jquery-1.3.2.js.

If you want to move the mouse over a table

You must introduce this JS file, write the following script into a JS file, reference the page, and finally execute this function when loading the page.

  1. /*
  2. * @ Param Tabid: Table Name
  3. * @ Param oveclass the style when the mouse enters
  4. * @ Param outclass the style when the mouse leaves (the style name)
  5. */
  6. Function altrow (Tabid, oveclass, outclass ){
  7. VaR rowobj = $ ("#" + Tabid). Find ("TR ");
  8. $. Each (rowobj,Function (I, OBJ ){
  9. VaR TR = $ (OBJ );
  10. Tr. mousemove (Function (){
  11. Tr. addclass (oveclass );
  12. });
  13. Tr. mouseout (Function (){
  14. Tr. removeclass (oveclass );
  15. Tr. addclass (outclass );
  16. });
  17. });
  18. }

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.