• hi
    how can i add countdown timer when user click on download button.
    means when someone click on download link he wait xxx second before download start.
    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • hi, this feature is not available now. but you can implement this easily by modifying the link template adding script like

    <script>
        jQuery(".download-on-click").on('click', function(evt) {
            let link = jQuery(this);
            target = evt.target;
            if (!link.hasClass("timer-runned")) {
                evt.stopPropagation();
    
                setTimeout(function() {
                    console.log("timer runned");
                    link.addClass("timer-runned");
                    target.dispatchEvent(evt.originalEvent);
                }, 4000);
            }
    
        });
    </script>
    • This reply was modified 3 years, 11 months ago by ohanspace.
    • This reply was modified 3 years, 11 months ago by ohanspace.
    Thread Starter mesterperfect

    (@mesterperfect)

    hi
    I am using a sahifa theme, where do I put this code

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Countdown Timer on Download Button’ is closed to new replies.