Solved

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

Posted on 2014-02-13
3
343 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
  • 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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 …

776 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