When your website means business.

CSS3, Javascript, jQuery | Type: JavascriptToggle Next Item (FAQ)

Use mostly on FAQ; does not change toggle text.

HTML/PHP
<h3 class="toggle"><?php the_title() ; ?><span class="pointer">&raquo;</span></h3>
<div style="display:none;">Some stuff</p>

CSS
.toggle {
    cursor: pointer
}

SCRIPT
<script>
    jQuery(".toggle").click(function () {
    jQuery(this).next().slideToggle();
    }).next().hide();
</script>

Reference Links

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept