tags:

views:

32

answers:

2

Hi all,

My webpage consists of 3 tabs. When i click on the third tab, the heading must be in a hidden state. How do i achieve this.

My heading div is as follows

<div id= headingid>
<h1 class="heading">
 E-Z Search: List Search Topics & Criteria</h1>
</div>
+1  A: 

Using Jquery, you can write sometihng like this

$('#headingid').click(function(){
$('.heading').hide();
});
JWhiz
it would be good to hint which JS library you are using in the answer.
Anand
@Anand - very true.. nowadays.. ** javascript implies Jquery :) ** ..This is in JQuery .. I'll edit it to add that
JWhiz
+1  A: 

You can hide it like this:

$('.heading').hide();

You need to provide complete html markup including that of tabs for better answers.

If your click is triggered on the div with id headingid, your code should be:

$('#headingid').click(function(){
  $('.heading', $(this)).hide();
});
Sarfraz