hide "H6" tag

Posted on 2013-05-23
Medium Priority
Last Modified: 2013-05-23
In the code below, if the following tag is selected:

<div id="ctl09_ctl08_divPostponedTaskGrid">

How do I hide the sibling above it?   ( the <h6> tag )

		<td><span>Completed by: Jaren Morris</span></td><td rowspan="4">

 <h6>Postponed Task</h6>
<div id="ctl09_ctl08_divPostponedTaskGrid">


		<td><span>Completed Date: 2/25/2013 11:27:23 AM</span></td>
		<td><span>Assigned Role: Client Contact-L1</span></td>
		<td><a href="ViewHTML.aspx?ApprovalQueueID=779111-1" target="Task History">Task View</a></td>

Open in new window

Question by:Tom Knowlton
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
LVL 42

Accepted Solution

sedgwick earned 2000 total points
ID: 39191833
basically this:
$('#ctl09_ctl08_divPostponedTaskGrid').select(function() {

Open in new window

however by the id i can tell that this is asp control, so the way to do it in jquery is:
 $('#<%= PostponedTaskGrid.ClientID %>').select(function() {

Open in new window

i used PostponedTaskGrid as the asp ctrl name, u should replace it with the real asp control which is rendered there.

Author Closing Comment

by:Tom Knowlton
ID: 39191860
Thank you.  I am sure that works.

My interim solution:

  $(document).ready(function () {

        $('div[id*="_divPostponedTaskGrid"]').each(function () {

            var tablecount = $(this).children('div').children().size();

            if (tablecount == 0) {               
            else {
                $(this).closest('#frame').css('background-image', 'none');


Open in new window

Was prevAll(  )  an okay choice?

It works - but was it correct?

Also, I am not familiar with select(  )

I thought these were the same thing:

 $('#<%= PostponedTaskGrid.ClientID %>').each(function() {


 $('#<%= PostponedTaskGrid.ClientID %>').select(function() {

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
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…
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Suggested Courses

770 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