• I’m hoping to find a tutorial for collapsable menu’s that will allow me to expand and collapse a menu based on the Catagory.

    ex//
    Main Catagory
    Sub Catagory
    Blog Post

    each level would be expandable and collapsable, I’ve seen a tutoria to do something like this in MT, I don’t really care if it is a pure css or a javascript method, although of course a pure css method would be kind of cool, if anybody know where might be able to find something like this.. i would really appreciate the help, thanks

    oh here is the mt tutorial showing roughly the same thing

    https://www.elise.com/mt/archives/000674expandable_list_menus.php

    thanks
    -chris

Viewing 15 replies - 16 through 30 (of 33 total)
  • OK I’ve uploaded it as a .txt file again – https://www.craftsnlace.net/php.txt – sorry the board contracted the relevant bits into links:(

    It’s not the # – that character is okay.

    In my browser (FF), I’m seeing a question mark at the start of each hyperlink above – are you ?

    Yes I am. I noticed it displaying on my blog page as well. should I remove that character or does it need to be replaced with something?

    In IE, it’s a box … and yes, it certainly does need to go.

    OK we are one step further on. It is still not displaying at all in IE and in the top part of the menu the links I’ve set up are displaying under their relevant titles.

    However if you look down at the bottom right hand side, the kadabra script is now working beautifully and it very elegantly opens and closes each section as we click on it!

    I’m wondering, if I remove the line <?php wp_link_pages(); ?> from the index.php file would that remove the top links and show only the four sections in the kadabra script? Obviously it would remove all my sub link sections of bulletin board, web school etc

    To be honest, I don’t know.
    The validator is showing some errors which could be affecting layout, so while I could suggest something, that may well create an error which happens to cover up an error – it’ll look like a fix but it won’t be.
    https://validator.w3.org/check?uri=http%3A%2F%2Fwww.craftsnlace.net%2Fwordpress%2F&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=1&verbose=1

    The link above says 21 errors, but it will be more like 7 (they snowball) and if they can be fixed it will help the task a huge amount – honestly.

    OK I have fixed it and got it valid, now to get the menus displaying the way I want – I think I’m beginning to understand enough about what’s happening to be able to add in the parts of the links that I want displaying as titles.

    It is by the way now displaying correctly in all three browsers – IE, Firefox and Netscape.

    I really am very grateful to you for all your help!

    You are very welcome ??

    And yes, there is.
    Using this validator link,
    https://validator.w3.org/check?uri=http%3A%2F%2Fwww.craftsnlace.net%2Fwordpress%2F&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=1&verbose=1
    look at lines 117-120:
    117: </form>
    118: </li>
    119: <li id="calendar">
    120: <table id="wp-calendar">

    If you also look at line 109, you’ll see this:
    109: <ul id="m4">

    The reason that the calendar is hidden is because the <ul> from line 109 is still open.
    Close this by putting
    </ul>
    right above
    <li id="calendar">
    in your index.php

    That might cause a validation error – so it will need checking, but that wil ve very easily fixed with adding anther tag somehere.

    https://validator.w3.org/check?uri=http%3A%2F%2Fwww.craftsnlace.net%2Fwordpress%2F&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=1&verbose=1

    OK I got it validated. One problem was that it wanted some links added to the Yahoo groups section and was reporting as invalid because there were no links between the opening and closing ul and /ul in that section.

    Now the page is displaying and reporting as validated and the next thing is to get the sections which are displaying all their links openly to display them only when clicked upon.

    I tried putting id=”linkage” into all of the kadabra script linked sections and it just brought up the list of links under My Sites plus the validator complained, so I guess I’ve got to have a different name calling each section – so how do we set that up please?

    I’m beginning to enjoy this:)

    The id in the index/sidebar must be the same id as used in the css for the css to be able to work.
    The name of the id does not have to be the same as the name of the section – it can help to keep them the same so you know whgat’s what, but you might want to rename if it is confusing at times – your choice.

    And it IS fun isn’t it ? ??

    LOL! yes it is fun.

    Hmm there is no id called linkage in the .css file wp-layout.css so I’m wondering if it’s elsewhere because it’s certainly working in the “Links to my Sites” section.

    If I add id=”linkage” to the other Links sections they just call the links from the Links to my Sites section, not their own ones. So I’m a little puzzled here as to what to do next.

    It’s not in the kadabra.js file either. Nor in the index.php file.

    Ah… that’s from my site ??
    <li id="linkage">
    In case I want to style a section differently, I apply an id – even if i don’t use it (as in this case).

    Your issue:
    160: <a href="#" onclick="return kadabra("m5");">Search</a>
    161: <ul id="m5">

    You have the kadabra on line 160, and the id on 161
    That area stays hidden on loading.

    131: <li id="categories"><a href="#" onclick="return kadabra("m2");">Categories</a>
    132: <ul id="m2">

    Ditto

    101: <li><a href="#" onclick="return kadabra('m8');">Yahoo Groups</a>
    102: <ul>

    No id .. it”ll show. Line 102 needs to read
    <ul id="m8">

    Get the idea ?

    Yup I do and I’m off to fix it now – I was taking a break from it for a bit:) best way with web coding when you can’t see the wood for the trees!

    OK so you put the id before each link otherwise it won’t work – just as when you’re doing Javascript you put it in the head in the order in which you want each script to activate:)

    Yes.
    The id link goes before each set of links – and don’t forget that if you have m1 – m50 on index.php, you’ll be needing those in the css too.

    Duplicate posting, sorry.

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘Collapsable Menus’ is closed to new replies.