[jQuery] Change overflow of div when element clicked
Hello,
I'm fairly new to jQuery and am trying to do the following.
I am using a coda slider effect for a website, which is working fine.
What I need to do is change the overflow CSS property for a div when
another element is clicked.
Here's what I have:
<script type="text/javascript">
$(document).ready(function(){
$("#test").click(function() $("#faq").css("overflow","auto");
});
</script>
...snip...
<div id="navTab">
<ul class="navigation">
<li><a href="#home">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#practice">Practice Areas</a></li>
<li><a href="#faq" id="test">Common Questions</a></li>
<li class="strip"><a href="#contact">Contact and Directions</
a></li>
</ul>
</div>
...snip...
<div class="panel" id="faq">
<h1>Common Questions</h1>
Intro Paragraph
<div class="accordion">
<h3>Do I need a lawyer?</h3>
Paragraph 2 content
</div>
CSS for #faq has overflow set to hidden. What I want to happen is
when people click on the Common Questions link that is changes the
overflow property of #faq to auto (overflow:auto).
Right now, nothing happens when I click the link.
Help is appreciated!