| Author |
jQuery doubt with reference to Object Literal Example.
|
Vishal Hegde
Ranch Hand
Joined: Aug 01, 2009
Posts: 984
|
|
The below code is not working....I mean i wanted even table rows to be gray but its not happening ??? I am not sure where I am wrong in this case
|
http://www.lifesbizzare.blogspot.com || OCJP:81%
|
 |
Amit Bhargava
Greenhorn
Joined: May 20, 2011
Posts: 20
|
|
|
Could you please post the JSP/HTML page where this is going to be applied?
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
It has nothing to do with the object, it hsa to do with the example.
Background color is applied to the cells [td] and not the rows [tr].
Eric
|
 |
Vishal Hegde
Ranch Hand
Joined: Aug 01, 2009
Posts: 984
|
|
Eric Pascarello wrote:It has nothing to do with the object, it hsa to do with the example.
Background color is applied to the cells [td] and not the rows [tr].
Eric
But the below code is working fine... and its the same example
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
See fine to me: http://jsfiddle.net/H9wHT/1/
Eric
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
Why do you have headings in a td?
Your table really should look like this:
|
 |
Amit Bhargava
Greenhorn
Joined: May 20, 2011
Posts: 20
|
|
|
I haven't tried this out myself, but have you tried $('table.data tr:even')?
|
 |
Vishal Hegde
Ranch Hand
Joined: Aug 01, 2009
Posts: 984
|
|
Eric Pascarello wrote:Why do you have headings in a td?
Your table really should look like this:
Will that make any changes?? I mean .js file should work right incase i am using Object Literal??? it is working when i am using .css(mentioning the color code)
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56531
|
|
|
Do your td elements have a background color? If so, the color of the tr element will not show through.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: jQuery doubt with reference to Object Literal Example.
|
|
|