easy-weather-npm
Version:
A JavaScript plugin for getting Weather information
34 lines (31 loc) • 1.01 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom weather</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<div id="weather"></div>
<h3>Please check your console</h3>
<script src="js/easy-weather.js"></script>
<script type="text/javascript">
const weather = new EasyWeather('#weather', {
key: '1d74efe09d3495016664881f4a09a7ff',
location: 'London',
iconStyle: 'line',
sunTime: true,
details: true,
forecast: true,
quarterly: true,
description: true,
customTemplate: function(element, weather) {
console.log('element', element);
console.log('weather', weather);
}
});
</script>
</body>
</html>