Solved

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

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

830 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