Lightweight jQuery plugin to get current weather data from Open Weather
Include the latest version of jQuery, Bootstrap and jQuery-openWeatherData.js in the <head> of your HTML document:
<link src="bootstrap.min.css">
<script src="jQuery.min.js"></script>
<script src="jQuery-openWeatherData.js"></script>Syntax Example
<div class="weather"></div>$.fn.weatherData.defaults.apiKey = "YOUR-API-KEY-HERE";
$(document).ready(function () {
$("div.weather").weatherData({
titleFontSize: 28,
tempFontSize: 28,
: 16
});
});Custom Parameters
apiKey API KEY from Open Weather
titleFontSize Font size for title (eg. Weather for Kathmandu)
tempFontSize Font size of temprature text (eg. 23°C)
dataFontSize Font size for other weather details in the table
This project is licensed under the MIT License - see the LICENSE file for details