Display Live COVID-19 Data By Country - covid-tracker.js

File Size: 6.45 KB
Views Total: 492
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Display Live COVID-19 Data By Country - covid-tracker.js

Just another jQuery based Coronavirus Disease 2019 tracker (~1.5kb) that fetches live COVID-19 data from coronavirus-tracker-api and shows confirmed cases & deaths by country on the webpage.

How to use it:

1. Download & unzip the plugin and then load the minified version of the jQuery covid-tracker.js plugin after loading the latest jQuery JavaScript library.

<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/dist/covid-tracker.min.js"></script>

2. Show latest cases and deadths by country using the data-covid-tracker-country attributes:

<h4>Cases in the U.S. </h4>
<span class="covid-tracker-country covid-tracker-cases"
      data-covid-tracker-country="US">
</span>

<h4>Victims in the U.S.</h4>
<span class="covid-tracker-country covid-tracker-deaths"
      data-covid-tracker-country="US">
</span>

3. Or show global cases as follows.

<h4>Coronavirus Cases</h4>
<span class="covid-tracker-global covid-tracker-cases"></span>

<h4>Coronavirus Deaths:</h4>
<span class="covid-tracker-global covid-tracker-deaths"></span>

More COVID-19 Resources:


This awesome jQuery plugin is developed by Wtower. For more Advanced Usages, please check the demo page or visit the official website.