Solved

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

Posted on 2011-09-21
8
228 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:knowlton
  • 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
 
LVL 5

Author Comment

by: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
3 Use Cases for Connected Systems

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

 
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: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:knowlton
ID: 36576328
thx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SharePoint 2013 Searchbox Branding 11 45
get radio button vale in array 7 44
Jquery autocomplete 10 68
Replace &lt; with < 14 56
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
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…

896 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now