PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Mar 23, 2017 11:16 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Sep 20, 2016 12:13 pm 
Offline
Forum Newbie

Joined: Sun Sep 11, 2016 9:36 pm
Posts: 6
Some cells on my table have background colors. The table's row colors are alternating. I created a hover in table row. When the mouse is over a row, it hovers and all the background colors of some colorful cells are invisible. How can I hover but still keep the background?

CSS:

Syntax: [ Download ] [ Hide ]
tr:hover td,
tr.even:hover td.active,
tr.odd:hover td.active {
background-color: #EBEBEB ;
}
 

JQuery:

Syntax: [ Download ] [ Hide ]
$(document).ready(function()
    {
        $("tr:odd").css("background-color", "#dfe7f2");        
    });


Top
 Profile  
 
PostPosted: Tue Sep 20, 2016 10:46 pm 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13385
Location: New York, NY, US
Please provide the HTML of the table too.

_________________
(#10850)


Top
 Profile  
 
PostPosted: Wed Sep 21, 2016 6:44 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6187
Location: Montreal, Canada
Why are you setting some rules in CSS and others in JS?

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group