• Resolved Aprazors

    (@aprazors)


    How to create countdown time which appears before download button

    I want to add countdown timer before my download button anybody know how to do it please help me on internet i found only one site useful but its not working anymore!!

    please help me how to make countdown timer or please tell me errors in this code.

    <script type=”text/javascript”>
    jQuery(document).ready(function() {
    var sec = 30
    var timer = setInterval(function() {
    $(“#mdtimer span”).text(sec–);
    if (sec == 0) {
    $(“#makingdifferenttimer”).delay(1000).fadeIn(1000);
    $(“#mdtimer”).hide(1000) .fadeOut(fast);}
    },1000);
    });
    </script>
    <center>
    Download
    </center>
    <div id=”mdtimer”>
    <b></b>
    <div style=”font-size: large;”>
    <b>Please Wait <span>30</span> seconds</b></div>
    </div>

    i got this code but when i add this text below my article then it works fine but when i logged out of wordpress it wont show the changes in current time remaining.
    Thank you very much !

Viewing 14 replies - 1 through 14 (of 14 total)
  • bdbrown

    (@bdbrown)

    Hi Aprazors. Why not use a countdown plugin? A whole lot less work for you and it already works.

    Thread Starter Aprazors

    (@aprazors)

    Dude Thank you Very much man I dont know why i always go for hard way and you tell me the easiest and simplest one ! Let me find it in deep is that work well for me or not !!

    Thread Starter Aprazors

    (@aprazors)

    Dude Its widget How to make it below the post means i want to show it below download button.

    ex.
    Downaload Now
    Countdown timer Here

    Its widget so it can only appear in sidebar or i can do this .??

    bdbrown

    (@bdbrown)

    1. Create a custom sidebar in Theme Options > Sidebars > Create Sidebars.
    2. Add the countdown widget to the sidebar.
    3. Edit the page where you want the widget and add a dynamic sidebar:

    <?php dynamic_sidebar('your-sidebar-id'); ?>
    Thread Starter Aprazors

    (@aprazors)

    Dear bdbrown I want to chnage downloading link every time for page so i cant use this widget and also yet i didnt got your 3 procedure and where is the add dynamic sidebar option appears in all pages??

    thank you very much for responce!

    bdbrown

    (@bdbrown)

    After you create the sidebar and add the widget, you need to add the “dynamic-sidebar” code to the page you want the widget on. The dynamic sidebar is created by the theme (when you create the sidebar) but you need to manually add the code to the page file. If you want a different countdown timer on every page, you would need to create a different sidebar, each with a unique sidebar-id, for each page and specify that sidebar-id on the page when you add the “dynamic-sidebar” php code.

    Thread Starter Aprazors

    (@aprazors)

    Sorry bro i want to use different callback link not different countdown for every page how to do this.??

    and in countdown plugin where i will find dynamic sidebar id.??

    WPyogi

    (@wpyogi)

    Why are you bolding every post?

    bdbrown

    (@bdbrown)

    @aprazors – I don’t have any information on how the countdown plugins work. That’s a question you should ask on the plugin support forum. The dynamic sidebar is created in the theme as I’ve described above; it is not part of the plugin.

    Thread Starter Aprazors

    (@aprazors)

    You didn’t get the meaning
    I means to say i want to add countdown widget to every page okay i added it but in countdown there is callback link means link which will redirect you to another page
    i want that callback link separate for each page how to do that!

    @wpyogi

    I bold post because i Love It to show people i am Different ! ??

    bdbrown

    (@bdbrown)

    If you want a different callback link on every page then you need to create a unique dynamic sidebar for each page. Same thing I mentioned above.

    Thread Starter Aprazors

    (@aprazors)

    ohh Thats not good then there must be anyway for this !

    i asked same question on forum and i get answer but i dont know exactly how to implement is can you please tell what this person want to say !

    Put your jquery counter code and the required html and CSS on the file footer.php for your wordpress theme.
    In the callback attribute for the counter, set the winodw.location.href to the new url where you want to redirect.

    bdbrown

    (@bdbrown)

    I can’t interpret another member’s answer. If you asked that question on a different forum then you should ask the member that gave you the answer to give you some additional information.

    Thread Starter Aprazors

    (@aprazors)

    Thank You !!!

    Appreciate your time ! I will ask him!!

    thank you again bdbrown ! ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘How to create countdown time which appears before download button’ is closed to new replies.