xif-fr / dokuwiki-plugin-catlist

DokuWiki plugin to list pages and namespaces recursively in nested lists
https://www.dokuwiki.org/plugin:catlist
8 stars 15 forks source link

Accordion #28

Open pixcase opened 5 years ago

pixcase commented 5 years ago

Hey,

to add an Accordion you have to,

  1. add an ID in line 457 to <ul id="accordion" class="catlist-nslist">
  2. add jquery to the head in the of main.php of your template (I use basic template)
  3. and <script type="text/javascript"> $(document).ready(function(){ $(".catlist-nshead").click(function(){ // trigger $(this).next("ul#accordx").slideToggle("fast"); // blendet beim Klick auf "dt" die nächste "dd" ein. $(this).children("a").toggleClass("closed open"); // wechselt beim Klick auf "dt" die Klasse des enthaltenen a-Tags von "closed" zu "open". }); }); </script> too. I try to add this to script.js file, but it doesn't work.
  4. add ul#accordion { display:none; } to your custom.css

I'm not an professional, but it work for me fine.


Did you can add this feature to the new update?

Kind Regards #

xif-fr commented 5 years ago

I will rework a bit what you've done, but this seems promising.