jquery countdown/countUP with server side values

Posted by basit. on Stack Overflow See other posts from Stack Overflow or by basit.
Published on 2010-03-15T07:57:01Z Indexed on 2010/03/15 7:59 UTC
Read the original article Hit count: 852

Filed under:
|
|
|
|
script: http://keith-wood.name/countdown.htm

daily json response: items: { fajr: '5:23 am', sharooq: '7:23 am', dhur: '1:34 pm', asr: '4:66 pm': magrib: '6:23 pm', isha: '8:01 pm'}

when site loads i make ajax request and get the above response times, these are events that happens daily for everyday, but different timing. i want to get that time and put a count down on how many minitues left or hours or seconds and show that and once the seconds are done, then show how many minitues ago that event took place, after 15 minitues later show new even count down. so following on how it will look on display

dhur 2 hours left

dhur 2 minutes left (if no longer hours left)

dhur 55 seconds left (if no longer minutes left)

dhur 5 seconds ago (if count down finished and then show how many seconds ago)

dhur 9 minutes ago (if extended more then seconds, then show how many minutes ago)

asr 1 hour left (after 15 minutes later time changes to new event)

this is kind of very simple for pro in javascript and really complicated for me, so need your guys help, if the script im using not good and you prefer some other script for this kind of task, please share with me, it dont have to be jquery script, but helps if its jquery.

© Stack Overflow or respective owner

Related posts about complex

Related posts about jQuery