Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-09-21
8
Medium Priority
?
239 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

DOM Attributes and Properties treatment with jQuery 1.6 by Ivo Stoykov jQuery (http://jquery.com/) 1.6 introduces .prop() (http://api.jquery.com/prop/) and .removeProp() (http://api.jquery.com/removeProp/) methods which allow modifying or removi…
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

610 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