JavaScript
Article

Online jQuery Stopwatch

By Sam Deering

jquery-stopwatch

Hi guys, I stumbled upon this online stopwatch developed using jQuery, it’s pretty cool. You can create laps and view a running total aswell which is pretty neat.

View Demo

Update: On closer inspection of the code It uses JavaScript and not much jQuery… still cool though. Maybe if I get time i’ll convert it into a jQuery plugin.

jQuery Code Used

Sam Deering
Meet the author
Sam Deering is a Front-end Web Developer who specialises in JavaScript & jQuery. Sam is driven and passionate about sharing his knowledge to educate others.
  • http://www.abcinterior.ru Alex

    Hi! If I need save final value in mysql base, how I can do this?

    • jquery4u

      @Alex – If you wanted to store the stop times in a mySQL database this could be achieved by binding an event to stop button that includes an AJAX call which passes the value to a PHP script server side that connects to the mySQL database and stores the value. Hope this helps. Sam

    • http://jquery4u.com/ jQuery4u

      Hi Alex, what exactly do you mean by “mysql base”. Do you mean storing it in a mysql database? This could simply be achieved by hooking up an event handler on the start/stop/pause buttons to send an ajax request with the time to store.
      Thanks,
      Sam

  • G

    How can I add a delay of 3 sec?

  • maurizio

    i have problems with jquery mobile.
    i need to refresh page for starting time. If i don’t do this, time stay at 0…

  • Guest888

    How to make this stopwatch start when the documen ready?

  • CubingWouter

    How do I make it work in my PHP-file? I’m really new to jQuery and PHP, sorry…

  • Taha Baba

    thanks :D
    can i make it reverse ? countdown from 60 to 0 then firing a function ?

  • Ben

    Thanks for the demo! I cant figure out how to remove ms from the counter, any help would be appreciated!

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in JavaScript, once a week, for free.