Im sure this topic has been broached before but here goes. My attemp is to hide a div and replace it with its counterpart.. As well, I need to add a class to a item while removing a class from the other. This is pretty simple im sure. Thank you
<script type="text/javascript">
$(document).ready(function() {
$('.form_sub').hide();
});
</script>
<script type="text/javascript">
$('a.theader_t').click(function(){
$('.form_header').show();
$('.form_sub').hide();
$('.theader').addClass('active');
$('sub_theader').removeClass('active');
});
</script>
<script type="text/javascript">
$('.sub_theader_t').click(function){
$('.form_header').hide();
$('.form_sub').show();
$('.theader').removeClass('active');
$('sub_theader').addClass('active');
});
</script>
My appologies for not asking the question. The first function works, the last 2 dont work at all. I want a.theader_t to show .form_header while adding the class active but taking active from sub_theader_t if it so applies. Thanks again!
the other two functions are not into the
and the third function has an error