/jQuery-openWeatherData

Lightweight jQuery plugin to get current weather data from https://openweathermap.org/

Primary LanguageJavaScriptMIT LicenseMIT

jQuery-openWeatherData

Lightweight jQuery plugin to get current weather data from Open Weather

Installation

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>

How to Use

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

License

This project is licensed under the MIT License - see the LICENSE file for details