Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9187963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:54:03+00:00 2026-06-17T19:54:03+00:00

I am using this CountDown Plugin , here is my code and view: <div

  • 0

I am using this CountDown Plugin, here is my code and view:

<div class="sc" lang="2013, 12 -1, 18">
<div class="sc" lang="2013, 6 -1, 22">

<script>
$(document).ready(function(){
$(".sc").each(function(){
$(this).countdown({until: $(this).attr("lang"), compact: true, format: 'HMS', description: ''});});});
</script>

My problem is it returns wrong time, example: 00:34:00 and the other is 00:34:03.

Could anyone help me?

I’m trying to learn English, so i speak English not well, so sorry.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:54:04+00:00Added an answer on June 17, 2026 at 7:54 pm

    You are using the until parameter incorrectly, you need a new Date object there and your current lang attr cannot be parsed into that.

    EDIT: Since your target date is so far away it would be better if you used ODHMS or DHMS as your format to include months and days as needed.

    I have made some changes to your code to make it work.

    HTML:

    <div class="sc" lang="2013, 11, 18"></div>
    <div class="sc" lang="2013, 5, 22"></div>
    

    JQuery:

    $(document).ready(function () {
        $("div.sc").each(function (i, item) {
            var targetDate = $(item).attr("lang").split(',');
            $(item).countdown({
                until: new Date(targetDate[0].trim(), targetDate[1].trim(), targetDate[2].trim()),
                compact: true,
                format: 'DHMS',
                description: ''
            });
        });
    });
    

    Also check a working sample in this fiddle: http://jsfiddle.net/EkmsT/

    EDIT 2 : I have changed the lang values to 11 and 5 instead of 12-1 and 6-1 and used it directly in the countdown code as targetDate[1].trim(). You can still use 12 -1 and 6 -1 and change the new Date code to use parseInt(targetDate[1].trim())

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this piece of code in the head of a page: <script type=text/javascript> function
I'm using jQuery Countdown plugin with multiple instances on one page <div class=TimeLeft> <?php
I am using this jQuery countdown plugin here and it seems pretty straightforward but
i have problem with my script using jquery.countdown.js plugin, it doesn't sets multiple instances
I'm using this jQuery countdown plugin: http://keith-wood.name/countdown.html I'm trying this to set the countdown
I am using this plugin for a countdown clock Its great, but I need
I have been using this script ( http://www.dynamicdrive.com/dynamicindex6/dhtmlcount.htm ) for countdown to vacations. But
I am using Keith Woods countdown timer (http://keith-wood.name/countdown.html) with the serverSync function. This seems
I am using this Android class to implement a countdown: http://developer.android.com/reference/android/os/CountDownTimer.html I have created
I have coded a simple PHP Countdown Timer using this code: list($date,$time)=explode( ,$compounddate); list($thour,$tminute,$tsecond)=explode(:,$time);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.