Author: | codeconcept |
---|---|
Views Total: | 688 views |
Official Page: | Go to website |
Last Update: | March 28, 2020 |
License: | MIT |
Preview:

Description:
A pure JavaScript solution to show the live COVID-19 statistics (confirmed cases, recovered patients, and deaths) by country.
Based on https://covid19.mathdro.id/api.
See Also:
- Live Coronavirus (COVID-19) Statistics Widget – Covid19stats.js
- Best Free Coronavirus Disease (COVID-19) Design Resources
How to use it:
1. Create a select element from which the users can select a country to show the live updated stats of the Coronavirus (Covid-19).
<select name="countries" id="countries"> <option value="all">World</option> </select>
2. Create an empty container to hold the statistics.
<div class="country-stats"></div>
3. Put the main JavaScript index.js at the end of the document. That’s it.
<script src="./index.js" defer></script>
4. By default, the library uses Bootstrap 4 for the styling of the stats.
<link rel="stylesheet" href="/path/to/cdn/bootstrap.min.css" />
Changelog:
03/28/2020
- JS update & bugfixed
Hi sir.. you have an API for Davao city or Davao region?