Home / Forums / DynamiX Support / Addressing the accordion panels

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts

  • vSkiper
    Participant

    Is there any chance to address and activate a accordion panel from the anchor/link in the same page?

    I would like to create a short Executive Summary that will address more info in panels and make some cross references.

    Andy
    Andy
    Keymaster

    Off the top of my head I don't think it's possible, but for more information you can look here. http://docs.jquery.com/UI/Accordion 


    Diego Meozzi
    Participant

    I ran into the same problem on a glossary page I'm building with one accordion for each letter and a lot of cross-referenced links (anchors) on the same page. All the links pointing to accordions on the same page are not working. See my test page here:

    http://test.stonepages.com/glossary/

    Is there any solution, as it seems this issue has been already raised more than one year ago?

    BTW the solution posted here is no longer valid:

    http://help.themeva.com/groups/dynamix-support/forum/topic/opening-accordions-remotely/

    Thanks!

    Andy
    Andy
    Keymaster

    Hi,

    Yes you can now – I added the functionality after this post. 

    Adding a #2 to the URL will open panel 3 (starts at 0). 

    http://dynamix.creativeworkz.co.uk/accordion/#2


    Diego Meozzi
    Participant

    Unfortunately it does not work at all. Have a look at this page:

    http://test.stonepages.com/england/

    The link on that page

     <a href="http://test.stonepages.com/england/#1">Link to Accordion B</a>

    Just does not open any accordion, even if copied directly on the browser URL field.

    Same ont my glossary page:

    http://test.stonepages.com/glossary/

    The first link on the "A" section, the one on the "standing stones" sentence is coded as follow:

    http://test.stonepages.com/glossary/#16

    But when clicked it does nothing.

    Any idea?

     

     


    Thomas Keller
    Participant

    Hi Andy

    you wrote: I added the functionality after this post. 

    What does it mean? Is it necessary to install an update of 2.8.8 or is there only a file needed for replace?


    Rich
    Participant

    The jquery function is different in Diego's page. Missing a call to head.ready function and getacc_id is set to false. So somewhere the script is being overwritten.

    Out of date file or being overridden in child theme.


    Diego Meozzi
    Participant

    Hi Rich,

    My test page does use the parent Thene, not the child one. And there is just a very few plugins activated. So, how can that jQuery function be overwritten?


    Rich
    Participant

    Not sure – it is quite different though.

     

    head.ready(function() {

            (function ($) {

            $(document).ready(function() {

            var getacc_id='';

    var getacc_id = parseInt(window.location.hash.slice(1)); // retrieve # number

        

            if(!getacc_id) {

                getacc_id = 0;

            }

            // Accordion

           $(".accordion").accordion({ header: "h3.accordionhead",autoHeight: false,collapsible: true,navigation:true,active:getacc_id});

           

            });

            })(jQuery);

            });

            

    on dynamix versus the following on your test site

     

            (function ($) {

            $(document).ready(function() {

            var getacc_id='';

    var getacc_id = parseInt(window.location.hash.slice(1)); // retrieve # number

        

            if(!getacc_id) {

                getacc_id = 0;

            }

            // Accordion

           $(".accordion.collapse").accordion({ header: "h3.accordionhead",autoHeight: false,collapsible: true,navigation:true,active:false });

           

            });

            })(jQuery);

     


    Diego Meozzi
    Participant

    Thanks for the info, Rich. But if you download a fresh copy of Dynamix v.2.8.8 from Themeforest, and analyze its contents, there is NO trace of that

    head.ready(function()

    on any file.

    Any idea?

    Andy
    Andy
    Keymaster

    Hi Diego,

    That's the code in the raw javascript file dynamix.js but for the released version it's packed to save load time. 

    Try removing the map script from the footer and see if it works – other than that it's the same as the dynamix demo site and should work. 


    Diego Meozzi
    Participant

    OK, I deleted and reinstalled everything from scratch (WP+MySQL db+Theme) on my test webspace. I placed a single link to an accordion on this page:

    http://test.stonepages.com/england/

    And it still does not work.

    Any help would be greatly appreciated!

    Andy
    Andy
    Keymaster

    Hi Diego,

    If you have collapse in the shortcode can you try removing it and see what happens then?


    Diego Meozzi
    Participant

    If all accordion panels are set to open by default, the command that make a single accordion to "open" does nothing, as all panels are already open… In any case, see the [accordion collapse="no"] result here:

    http://test.stonepages.com/england/

    Question: if adding an anchor with a number to its URL makes the relative accordion to open, would this rule out the possibility to address any anchor put inside one of the accordions? I mean, if I have a term with a link to an anchor, that would (at best – as it's not currently working) open only one of the accordions and not move the page to the entry that's inside that accordion, right?


    Diego Meozzi
    Participant

    I believe this is a low-priority issue, but I hope you can help me to fix this issue anyway soon.

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.