Jquery attribute selector not has How to Write row hover highlighted display

Source: Internet
Author: User

Copy codeThe Code is as follows:
$ (Function (){
/*
// $ ("Html body div table. table_list tbody tr "). not (": has ('td a img [src * javastj.gif] ')"). mouseover (function (){
$ ("Html body div table. table_list tbody tr: not (': has ('td a img [src * javastj.gif]')"). mouseover (function (){
// Alert ($ (this) [0]. style. backgroundColor );
Certificate (this).css ("backgroundColor", "66 CCFF"); // "red" # f8fbfd"
$ (This). mouseout (function (){
Certificate (this).css ("backgroundColor", ""); // $ (this) [0]. style. backgroundColor = "";
});
});
*/
Var tr2 = $ ("table. table_list tr: not (': has ('td a img [src * using tj.gif]')");
Tr2.mouseover (function (){
Certificate (this).css ("backgroundColor", "66 CCFF ");
})
Tr2.mouseout (function (){
Certificate (this).css ("backgroundColor ","");
})
})

The code above highlights rows in a table that do not submit images when hovering

I first asked a question on bbs: Click to open the link

The answer is not satisfactory. I just want to learn more about jquery. Find This * = and in the Quick query manual in the appendix! = Contains and does not contain.

This line
Copy codeThe Code is as follows:
Var tr2 = $ ("table. table_list tr: not (': has ('td a img [src * using tj.gif]')");

Not, you can add another function has. Because tr is required to change color, img is not required to change color, so tr td a img [src! Required tj.gif] Always use quotation marks. Question: What should I do if there are three-layer quotation marks? Or single quotes?

Question: Why can tj.gif be used without quotation marks?
Copy codeThe Code is as follows:
[Src * javastj.gif

Is src?include A tj.gif string?

All can also be written as follows:
Copy codeThe Code is as follows:
Var tr2 = $ ("table. table_list tr"). not (': has ('td a img [src * using tj.gif]');

So I suspect that: in the selector represents the call selector.

Download: unzip the package and find main1, caiji, and task_send.html.

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.