Expanding collapsing sliding jquery
Expanding collapsing sliding jquery
We have need to first attach this jquery for expanding collapsing .
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"
type="text/javascript"></script>
<h4 id="expanderHead"
style="cursor:pointer;">
EXPANDING
COLLAPSING DIV <span id="expanderSign">+</span>
</h4>
<div id="expanderContent"
style="display:none">
content<br
/>
content<br
/>
content<br
/>
content<br
/>
content<br
/>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#expanderHead").click(function(){
$("#expanderContent").slideToggle();
if
($("#expanderSign").text() == "+"){
$("#expanderSign").html("−")
}
else
{
$("#expanderSign").text("+")
}
});
});
</script>
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home