Skip to content
This repository was archived by the owner on Jan 31, 2018. It is now read-only.

Latest commit

 

History

History
22 lines (20 loc) · 944 Bytes

File metadata and controls

22 lines (20 loc) · 944 Bytes

jquery showhide

A simple jQuery show/hide plugin. Assumes your toggle HTML flows as follows:

  • A component container element - this should contain your visible summary content and detail content which is hidden on page load
    • A nested summary element. This should have the CSS class .summary
    • Nested details element. This should have the CSS class .details

Current available Options

  • openByDefault - boolean, set to false by default
  • toggleLinkText - Comma separated string. Default value is 'Show more, Show less'
  • clickableSummary - Make the whole summary clickable. false by default

Still to do

  • Allow for direct linking via hashtag
  • Allow for nested show/hide panels
  • Option to specify easing

View the demo