Solved

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

Posted on 2014-02-13
3
336 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 42

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

757 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

18 Experts available now in Live!

Get 1:1 Help Now