Solved

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

Posted on 2011-09-21
8
227 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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…

743 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

12 Experts available now in Live!

Get 1:1 Help Now