Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1288722

    Good morning,
    referring to this topic: https://kriesi.at/support/topic/download-link-in-tab-section-tab-title/
    i was able to force a download action after clicking on a tab section, thanks to the following script provided by Ismael:

    <script>
    (function($){
    function a() {
    var download = $(‘.av-section-tab-title[data-av-tab-section-title=”7″]’);

    download.on(‘click’, function(e) {
    e.preventDefault();
    window.open(
    ‘YOUR LINK’,
    ‘_blank’
    );
    });
    }

    a();
    })(jQuery);
    </script>

    Unfortunately the above script is no longer working. May it be due to the new theme updates? I’m kindly asking if it would be possible to fix the code to make it work again.

    Thank you very much

    #1289392

    Hey Qgrafica_7,

    Could you post a link to where we can see the element where you are trying to apply this to please?

    Best regards,
    Rikard

    #1289641

    Hi, thank you for your reply. I’ve included the link in the private section. Scroll down just a little on the page and you’ll find the tab section. The last item on the right is the “download” button i’m asking about

    #1290334

    Hi,

    Thanks for that. It looks like you have added another tab since adding the script? The download tab now has a different number, please try the following instead:

    <script>
    (function($){
    function a() {
    var download = $('.av-section-tab-title[data-av-tab-section-title="8"]');
    
    download.on('click', function(e) {
    e.preventDefault();
    window.open(
    'YOUR LINK',
    '_blank'
    );
    });
    }
    a();
    })(jQuery);
    </script>

    Best regards,
    Rikard

    #1290344

    Good morning,
    i tried and the provided code still doesn’t work

    #1291020

    Hi,

    Thanks for the update. Maybe it’s better if you keep on using the current solution, with a link in the actual tab then?

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.