$(function(){
/*
/ /$("html body div table.table_list tbody tr").not(":has('td a img[src*=tj.gif]')").mouseover(function(){
$(" html body div table.table_list tbody tr:not(':has('td a img[src*=tj.gif]')')").mouseover(function(){
//alert($(this )[0].style.backgroundColor);
$(this).css("backgroundColor","66CCFF");// "red" "#f8fbfd"
$(this).mouseout(function( ){
$(this).css("backgroundColor","");//$(this)[0].style.backgroundColor="";
});
});
*/
var tr2=$("table.table_list tr:not(':has('td a img[src*=tj.gif]')')");
tr2.mouseover( function(){
$(this).css("backgroundColor","66CCFF");
})
tr2.mouseout(function(){
$(this).css(" backgroundColor","");
})
})
The above code allows rows in a table that do not submit images to be highlighted when hovering
I First ask the question on bbs:
Click to open the link If you are not satisfied with the answer, you can finally learn the sharp jquery and find this *= and = in the appendix quick reference manual to indicate inclusion and exclusion respectively. Contains.
This line
var tr2 =$("table.table_list tr:not(':has('td a img[src*=tj.gif]')')");
not can put another function inside has Because you want tr to change color and not img to change color, you cannot use tr td a img[src!=tj.gif] Note that both quotes are required: What should I do if there are three layers of quotes? Or single quotes?
The problem comes again. How can tj.gif be used without quotation marks?
[src*=tj.gif
Meaning that the src attribute contains the tj.gif string?
All can also be written like this:
var tr2=$("table.table_list tr").not(':has('td a img[src*=tj.gif]')');
So I doubt the selection In the selector: means calling the selector.
Download: After unzipping, look for main1/caiji/task_send.html.