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
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
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
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
Good morning,
i tried and the provided code still doesn’t work