Part 1: Updating HTML using JavaScript
- Remix this Glitch project into your Glitch account.
- Using JavaScript only, make the page display today's date where it currently shows "...". There are detailed hints in the JavaScript file.
- Confirm that the changes you have made work.
Part 2: Using Mustache
- Remix this Glitch project into your Glitch account.
- Find the popup template in the HTML.
- Change the HTML. You can include other columns (in the JavaScript, in the
featureClickColumns
to see which are available here).
- Try adding a
class
to one of the elements in the popup template and styling that class
in your CSS.
Part 3: Using the SQL API
- Remix this Glitch project into your Glitch account.
- Adapt the JavaScript to work on a dataset in your Carto account. You will have to change the:
- username (line 13)
- API key (line 14)
- dataset name in the source (line 18)
- CartoCSS (line 21)
- count SQL (line 46)
- username (line 50)
- Confirm that the changes you have made work.