New Landing How can we help? Themeforest Theme Support Dante Open Toggle with Anchor Link?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Dante
  • #97731
    FNFWeb
    Member
    Post count: 27

    I’m creating a FAQ page and would really love to use toggles for each question. It would be really cool to have it so that anchor links will automatically open the correct toggle. Might be wishful thinking, but thought I’d ask. Any way to do this?

    Thank you!

    #97763
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me specific page url so i can suggest you any solution.
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #120202
    bradleyrf
    Member
    Post count: 5

    I am having the same issue. I would like to link to the second tab on this page from another page by using the URL

    http://develop.citizensclimatelobby.org/about-ccl/#Our-Founder

    Any suggestions?

    #120346
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi there,

    Unfortunately that is not part of the current theme functionality, and it’s not within the scope of our support to be able to provide that functionality as it is more work than a small customisation. While we’d love to be able to support every customisation request, we simply don’t have the time. We recommend that you seek a freelance developer if you need that functionality, potentially from one of the below resources:

    https://codeable.io

    Home


    http://www.microlancer.com

    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #120573
    bradleyrf
    Member
    Post count: 5

    I went ahead and wrote some Javascript code to handle this functionality. If your link would normally be

    http://domain.com/page/#Name

    you instead link to

    http://domain.com/page/#tab-Name

    It’s a little slow to switch the tab but it works. If anyone can improve on the code feel please post it here.

    <script type="text/javascript">
     window.onload = function() {
         if (window.location.href.indexOf("#tab-") > -1) {
             var url_anchor = window.location.href.substring(window.location.href.indexOf("#tab-") + 5);
             if (url_anchor.length != 0) {
                 var els = document.getElementsByTagName("a");
                for (var i = 0, l = els.length; i < l; i++) {
                     var el = els[i];
                     if (el.href.indexOf('#' + url_anchor) > -1) {
                         el.click();
                         window.location.hash = url_anchor;
                         window.scrollTo(0, 0);
                     }
                 }
             }
    
         }
     };
    
    </script>
    #120586
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Thanks for sharing the info.
    -Rui

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register