Skip to content

kennethtran93/WeatherWidget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Widget

Weather Widget for websites
ACIT 1620 - Web Development
Assignment 4 - Weather Widget using JavaScript and jQuery

Please note:
OpenWeatherMap.org's API has changed since the completion of this widget, which has made this widget non-functional.

Team

  • Yoseph Jo
  • Kenneth Tran

Demo

You can demo our weather widget by simply opening the index.html webpage file included!
(Windows XP visuals are just for special effects, and are separate from the actual weather widget!).

Installation

To install our weather widget on your website:

  1. Place the following file into your JavaScript folder (from our js folder):
  1. Place the following file into your Styles folder (from our css folder):
  1. Copy and paste the following into the <head> section your webpage(s).
    Change the folder names (Style, JavaScript) to whatever your folder names are:
<link rel="stylesheet" type="text/css" href="css/WeatherWidget.css">
<script src="https://code.jquery.com/jquery-1.11.1.js"></script>
<script src="https://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script src="http://momentjs.com/downloads/moment.js"></script>
<script src="http://momentjs.com/downloads/moment-timezone-with-data.js"></script>
<script>
    moment().format();
</script>
<script src="js/WeatherWidget.js"></script>

Explanation of above code (in order):

  • The CSS Styling Code for the Widget
<link rel="stylesheet" type="text/css" href="css/WeatherWidget.css">
  • The jQuery code (fetched from the web)
<script src="https://code.jquery.com/jquery-1.11.1.js"></script>
  • The jQuery UI code (fetched from the web)
<script src="https://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
  • Part of the script required for the timezone conversion (fetched from the web)
<script src="http://momentjs.com/downloads/moment.js"></script>
  • Part of the script required for the timezone conversion (fetched from the web)
<script src="http://momentjs.com/downloads/moment-timezone-with-data.js"></script>
  • To setup the moment timezone conversion
<script>
    moment().format();
</script>
  • The JavaScripts required for the Weather Widget to function
<script src="js/WeatherWidget.js"></script>
  1. Copy and paste the following into the <body> section your webpage(s).
    This code can be placed anywhere within the <body></body> tags:
<div id="widget"></div>

Explanation of above code

  • Required to load the weather widget onto the webpage