JS support to expand/collapse content, like HTML5 details/summary elements
Project description
django-html5accordion adds JS support to expand/collapse any content, like HTML5 details/summary elements. It can be called on any element, and takes as an argument a selector for the summary contents that should always remain visible (and act as the link to expand/collapse the hidden content).
Dependencies
jQuery library (http://jquery.com/)
Installation
In your Django project settings, add “html5accordion” to your INSTALLED_APPS.
Usage
Linking the JS:
<script src="{{ STATIC_URL }}html5accordion/jquery.html5accordion.js"></script>
Sample HTML:
<article class="details"> <header class="summary"> <p>This content will always be visible</p> </header> <div> <p>This content will expand/collapse when `.summary` is clicked</p> </div> </article>
Calling the plugin:
$('.details').html5accordion('.summary');
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-html5accordion-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51b5b949c827b8693e3e510f4246b8bbaf4f0a76721c99a458e77c699af83851 |
|
MD5 | 7ef989e1fbd90bc1ccc29a90a8de9405 |
|
BLAKE2b-256 | 1e90d495b18544d6152b719cb8c6756ce0b9ee00e99985064ca3c61635908dfb |