Solved

Okay....just a little more help with table header

Posted on 2011-09-21
8
231 Views
Last Modified: 2012-05-12
Go here:

http://jsfiddle.net/knowlton/2m74p/39/

-I do not want to have a hover effect for the top row
-top row will be gray background, white text.
0
Comment
Question by:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 36576117
use : $('tr:gt(0)').hover(

updated : http://jsfiddle.net/2m74p/40/
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36576137
gery + white : http://jsfiddle.net/2m74p/41/

tr:first-child {
    background-color: grey;
    color: white;
} 

Open in new window

0
 
LVL 82

Expert Comment

by:leakim971
ID: 36576152
grey + white with jQuery : http://jsfiddle.net/kBgF3/
 
$("tr:eq(0)").css({ "background-color":"grey", "color":"white"});

Open in new window

0
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
LVL 5

Author Comment

by:Tom Knowlton
ID: 36576198
This code is also affecting other tables.

I want to do the hover for ONLY the table with "ShoppingShippingMethods1" as part of the table id.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36576208
$('tr:gt(0)' ,"#ShoppingShippingMethods1").hover(

and :

$("tr:eq(0)" ,"#ShoppingShippingMethods1").css({ "background-color":"grey", "color":"white"});
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 36576226
uupdated : http://jsfiddle.net/kBgF3/2/
$('tr:gt(0)','table[id*="ShoppingShippingMethods1"]').hover(
        function(){$(this).css({"background-color" : "blue", color: "white" });}, 
    function(){$(this).css({"background-color" : "white", color: "black" });}
    );

$("tr:eq(0)",'table[id*="ShoppingShippingMethods1"]').css({ "background-color":"grey", "color":"white"});

Open in new window

0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 36576323
NOTE TO SELF:

 $(document).ready(function ()
    {
        var loc = window.location.href;
        if (loc.indexOf("checkoutlegacy") != -1)
        {
            $('table[id*="ShoppingShippingMethods1"]').children().each(function(){
                $('td').css("border","1px solid black");
            });

            $('tr:gt(0)', 'table[id*="ShoppingShippingMethods1"]').hover(
                function () { $(this).css({ "background-color": "blue", color: "white" }); },
                function () { $(this).css({ "background-color": "white", color: "black" }); }
                );

                $("tr:eq(0)", 'table[id*="ShoppingShippingMethods1"]').css({ "background-color": "grey", "color": "white" });
        }

    });

Open in new window

0
 
LVL 5

Author Closing Comment

by:Tom Knowlton
ID: 36576328
thx
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question