Solved

Show the row for each of the dept name but only show the first column header row.

Posted on 2014-02-13
3
354 Views
Last Modified: 2014-02-20
Hi, I have a repeating header in my report which repeats one row for the dept name, then the next row shows all the column names (th)
I want to show the row for each of the dept name but only show the first column header row.

This gets me all the header rows - but how do I not include the first row?
$('th#FIRST_NAME').parent()

thx, Bill
0
Comment
Question by:bcarlis
[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
  • 2
3 Comments
 
LVL 2

Author Comment

by:bcarlis
ID: 39856476
I got it with this:

$('th#FIRST_NAME').parent().hide();
$('th#FIRST_NAME').parent().filter(":first").show();

but can I use straight css? or is there a better way to do it?

Oracle APEX creates the initial report so I don't think I can do it on rendering.

thx, Bill
0
 
LVL 43

Accepted Solution

by:
Chris Stanyon earned 175 total points
ID: 39857465
You can use the not() method with the eq selector:

$('th#first_name').parent().not(':eq(0)').hide();

Open in new window

This will select each parent of th#first_name and hide all but the first one - eq() takes a zero-based index - 0=1st, 1=2nd etc

You may have a problem because it looks like you have several elements using the same ID. IDs are suppsoed to be unique across your page. If you want to do it with CSS, you could use the jQuery selector to add a class, set to display: none

$('th#first_name').parent().not(':eq(0)').addClass('hidden');

Open in new window

//CSS
.hidden { display:none; }
0
 
LVL 2

Author Closing Comment

by:bcarlis
ID: 39874522
Hi Chris, Just saw you answered this.. I like yours better! Thx again!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

739 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