[jQuery] Re: Styling the 2nd table tag above a row

2008-12-12 Thread Karl Swedberg
On Dec 12, 2008, at 7:20 AM, Paul Mills wrote: Guy, A - I understand. I think you can make your code a bit simpler and not use the .each (function(). It depends on rest of the HTML whether it works or not. Something like this: $('tr.myclass').parents('table').parents('table').css("border

[jQuery] Re: Styling the 2nd table tag above a row

2008-12-12 Thread Paul Mills
Guy, A - I understand. I think you can make your code a bit simpler and not use the .each (function(). It depends on rest of the HTML whether it works or not. Something like this: $('tr.myclass').parents('table').parents('table').css("border", "4px black solid"); Rgds Paul On Dec 11, 9:04

[jQuery] Re: Styling the 2nd table tag above a row

2008-12-11 Thread Guy
OK, Figured it out and am posting this for anyone who may have this question later on. Here's what I used: $("tr.myClass").each(function() { $(this).parents("table").slice(1,2).css("border", "4px black solid"); }); Hope that is helpful to others. Guy On Dec 11, 12:13 pm, Guy wrote: > Hi,

[jQuery] Re: Styling the 2nd table tag above a row

2008-12-11 Thread Guy
Paul, I appreciate your help but the reason I want to use jQuery is because I don't have access to the source. I'm trying to style a SharePoint site and many of these tags are auto-generated so I'm limited as to what I can and cannot directly access via a class or id tag. So although I would norm

[jQuery] Re: Styling the 2nd table tag above a row

2008-12-11 Thread Paul Mills
Hi, Give the outer table a unique id such as id="outer" then use a css style to set bthe border #outer {border:1px solid red;} Not sure why you want to use jQuery? Paul On Dec 11, 5:13 pm, Guy <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having a dilemma where I need to style the table which encl