Hi
I have implemented some collapsible DIVs on an FAQ I am developing and I need some help with the change of state.
Here's the page code for collapsing the questions:
Here's the code I got from Dynamic Drive for collapsing:
Obviously I have 14 questions. They are 'grouped' so that when you click on one question it collapses the other questions (you only have one question open at once).
There is obviously another JS file I reference but my question relates to changing the state of the font of the question once it is open.
So when someone clicks on the question, the DIV expands but I then want to change the question font size to enlarge it.
Is this possible with the information I have provided above, or is this done from within the JS file?
Thanks in advance...
I have implemented some collapsible DIVs on an FAQ I am developing and I need some help with the change of state.
Here's the page code for collapsing the questions:
Code:
<strong><a href="javascript:animatedcollapse.toggle('Q1')">1. Do we need blah blah blah?</a></strong><br />
<div id="Q1"><p>Blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah</p></div>
Here's the code I got from Dynamic Drive for collapsing:
Code:
<script type="text/javascript">
animatedcollapse.addDiv('Q1', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q2', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q3', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q4', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q5', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q6', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q7', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q8', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q9', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q10', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q11', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q12', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q13', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.addDiv('Q14', 'fade=0,speed=600,group=faq,hide=1')
animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted
//$: Access to jQuery
//divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID
//state: "block" or "none", depending on state
}
animatedcollapse.init()
</script>
There is obviously another JS file I reference but my question relates to changing the state of the font of the question once it is open.
So when someone clicks on the question, the DIV expands but I then want to change the question font size to enlarge it.
Is this possible with the information I have provided above, or is this done from within the JS file?
Thanks in advance...