django-html5accordion 0.1.7

JS support to expand/collapse content, like HTML5 details/summary elements

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
BSD License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Jonny Gerig Meyer
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
django-html5accordion is a Django app that 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');

Last updated on November 20th, 2011

requirements

#JavaScript support #HTML5 details #Django #JavaScript #HTML5 #content

Add your review!

SUBMIT