Quote:
Originally Posted by Lace
Hmm...going to try this http://jsfiddle.net/sYwER/5/
Just might work for what I need.
Edit: Nope, unordered and ordered lists are not hidden. 
|
Taking what you had and then a little from what you found:
Script:
Code:
$(document).ready(function(){
$(".head").click(function(){
$(this).find(".expanderContent").slideToggle();
if ($(this).find(".expanderSign").text() == "+"){
$(this).find(".expanderSign").html("−")
}
else {
$(this).find(".expanderSign").text("+")
}
});
});
Changed up the html a touch to wrap each of your sections in a div:
Code:
<div class=head>
<h4 class="expanderHead">
HEADER 1<span class="expanderSign">+</span>
</h4>
<div class="expanderContent" style="display:none">
TEXT HERE
</div>
</div>
<div class=head>
<h4 class="expanderHead">
HEADER 2 <span class="expanderSign">+</span>
</h4>
<div class="expanderContent" style="display:none">
TEXT HERE
</div>
</div>
<div class=head>
<h4 class="expanderHead">
HEADER 3 <span class="expanderSign">+</span>
</h4>
<div class="expanderContent" style="display:none">
TEXT HERE
</div>
</div>
http://madspiders.com/divtest.htm