Solved

Hide Table Column through Jquery

Posted on 2010-11-24
4
963 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
[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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Suggested Courses

627 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