jQuery: Time between the two click events on a paragraph
jQuery Events : Exercise-14 with Solution
Count the number of milliseconds between the two click events on a paragraph.
Sample Data :
<body> <h1>Heading1</h1> <h2>Heading2</h2> <p>Paragraph</p> <button>Button</button> <div id="log"></div> </body>
Solution:
HTML Code :
JavaScript Code :
Live Demo:
Contribute your code and comments through Disqus.
Previous: Display the tag's name on click.
Next: Display the event type on clicking all h1 elements.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.