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

Free Guide:

7 Habits of Successful CTOs

"What makes a great CTO?" Engineering skills? Business savvy? An innate tendency to channel a mythical creature (ahem, unicorn)? All of the above? Discover the top traits of the most successful CTOs in this free guide.

  • 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!

  • mukul

    Please Share a full Code with database connectivity If any other having I really totally new in php p_mukul19@yahoo.com

  • Test Login

    please share a full code with database connectivity, id : test3login@gmail.com

Recommended
Sponsors
Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

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