Solved

Hide Table Column through Jquery

Posted on 2010-11-24
4
947 Views
Last Modified: 2012-08-14
Hi

I am trying to hide a column in an application Developed using Oracle Apex.

HTML of table is generated by Apex so I cannot change that. The table column starts with

<td headers="COL19" class="t9data">
......
.....
</td>


I tried following but it did not work
  $('td headers="COL19"').hide();


Please help

0
Comment
Question by:systemsautomation
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 34205691
$('td[headers="COL19"]').hide();
0
 
LVL 14

Expert Comment

by:sam2912
ID: 34206745
You could try something like this to remove all cells under the same table header:
var colHeader = $('td[headers="COL19"]');
var table = colHeader.parents("table");

table.find("tr").each(function() {
$(this).find("td")[colHeader.index()].remove();
});

Open in new window

0
 

Author Comment

by:systemsautomation
ID: 34210689
i want to hide a specific cell in the table.
How can i find the specific cell and how can i hide it?
0
 
LVL 14

Accepted Solution

by:
sam2912 earned 500 total points
ID: 34210750
How is the specific cell specified? You could do something like this:
var cell_rowNumber = 3;

var cell_colNumber = 5;



var table = colHeader.parents("table");



table.find("tr:gt(cell_rowNumber)").find("td")[cell_colNumber].remove();

Open in new window

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

758 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

19 Experts available now in Live!

Get 1:1 Help Now