Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter loiso

    (@loiso)

    justkristin, you need to do 2 steps (as i remember what i did yesterday):
    1. Copy, paste and save into listCollapse.js file the script listed at the end of
    https://www.howtocreate.co.uk/jslibs/htmlhigh/listCollapse.html Then uploas .js file to you wp root folder.
    2. Put in your template after <body> tag following script:
    <script type=”text/javascript” language=”javascript1.2″ src=”listCollapse.js”></script>
    <script type=”text/javascript” language=”javascript1.2″><!–
    window.onload = function () {
    compactMenu(‘someID’,true,’± ‘);
    }
    //–></script>
    Note:
    – you will need to replace someID tag with the correct css ID (in case of categories it should be “categories” by deflaut… i think).
    – setting second parameter in compactMenu() to true makes sub-items of menu to appear collapsed by defalult. You can set this to false if you want them to be shown on page load.

    Thread Starter loiso

    (@loiso)

    Sushubh, thanks a lot! This script was exactly what i wanted ?? First, i didn’t readed your link carefully enough and got how code works wrong… well, in fact i’m still not getting it fully :P… but it does what i want and it took just a couple minutes to set it up. Thanks again ??

    Thread Starter loiso

    (@loiso)

    Thanks! That’s makes the look much more compact. Is there some function to implement tree-like structure? So when the user clicks on parent category links to sub-categories will appear without reoading whole page.
    Btw, what dropdown_cats() function returns?

Viewing 3 replies - 1 through 3 (of 3 total)