?
Solved

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

Posted on 2011-09-21
8
Medium Priority
?
233 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 2000 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

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

Question has a verified solution.

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

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
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)

771 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