Skip to content

Commit

Permalink
Minor tweaks to the errors, cleaned up and fixes to the included demo…
Browse files Browse the repository at this point in the history
…, updated json package. Bumping version to 2.1.1
  • Loading branch information
fleeting committed Jan 17, 2013
1 parent 0d2bbb1 commit 1de2ceb
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 40 deletions.
25 changes: 5 additions & 20 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
Expand All @@ -9,10 +8,10 @@
<meta name="description" content="A simple jQuery plugin to display the current weather information for any location using Yahoo! Weather. Developed by James Fleeting.">
<meta name="viewport" content="width=device-width">
<!-- Facebook -->
<meta property="og:title" content="simpleWeather.js | Whoa, a weather plugin?">
<meta property="og:title" content="simpleWeather - a simple jQuery plugin">
<meta property="og:description" content="A simple jQuery plugin to display the current weather information for any location using Yahoo! Weather. Developed by James Fleeting.">
<meta property="og:url" content="http://simpleweather.monkeecreate.com">
<meta property="og:image" content="">
<meta property="og:url" content="http://monkeecreate.github.com/jquery.simpleWeather/">
<meta property="og:image" content="http://monkeecreate.github.com/jquery.simpleWeather/images/og-image.png">
<!-- /Facebook -->

<title>simpleWeather - a simple jQuery plugin</title>
Expand Down Expand Up @@ -66,11 +65,7 @@ <h1>Whoa, a weather plugin?</h1>
<div class="span12">
<h2>Usage</h2>

<p>Simply include jquery.simpleWeather.js in your site.</p>

<script src="https://gist.github.com/4106985.js?file=simpleweather.docs.html"></script>

<p>Then initialize simpleWeather, set your WOEID, US zip code or location, add a div with an ID of `weather` (or whatever you want, just change it in the init), and you are good to go.</p>
<p>Simply include jquery.simpleWeather.js in your site. Then initialize simpleWeather, set your WOEID, US zip code or location, add a div with an ID of `weather` (or whatever you want, just change it in the init), and you are good to go.</p>

<script src="https://gist.github.com/3982707.js?file=simpleweather.demo.js"></script>
</div>
Expand Down Expand Up @@ -99,21 +94,11 @@ <h2>Fancy Demo</h2>
</div>
</div>
<hr>

<div class="row-fluid">
<div class="span12">
<h2>Demo(ish)</h2>

<p>This is not really a demo, instead it shows you all the data that simpleWeather returns and how to use it. I wouldn't just copy and paste this, think of it as a reference.</p>

<div id="weather"></div>
</div>
</div>
</div>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http:////cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.1/bootstrap.min.js"></script>
<script src="jquery.simpleWeather-2.1.min.js"></script>
<script src="jquery.simpleWeather-2.1.1.min.js"></script>
<script>
$(function() {
$.simpleWeather({
Expand Down
13 changes: 13 additions & 0 deletions jquery.simpleWeather-2.1.1.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions jquery.simpleWeather-2.1.min.js

This file was deleted.

10 changes: 5 additions & 5 deletions jquery.simpleWeather.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* simpleWeather.js
* simpleWeather
* http://simpleweather.monkeecreate.com
*
* A simple jQuery plugin to display the current weather
Expand All @@ -8,7 +8,7 @@
* Developed by James Fleeting <@twofivethreetwo>
* Another project from monkeeCreate <http://monkeecreate.com>
*
* Version 2.1 - Last updated: January 11 2013
* Version 2.1.1 - Last updated: January 17 2013
*/
(function($) {
"use strict";
Expand All @@ -33,7 +33,7 @@
} else if(options.woeid !== '') {
weatherUrl += 'select * from weather.forecast where woeid='+options.woeid+' and u="'+options.unit+'"';
} else {
options.error("No location given. Please provide either a US zip code, WOEID or location.");
options.error("Could not retrieve weather due to an invalid WOEID or location.");
return false;
}

Expand Down Expand Up @@ -122,9 +122,9 @@
});
} else {
if (data.query.results === null) {
options.error("Invalid location given.");
options.error("An invalid WOEID or location was provided.");
} else {
options.error("Weather could not be displayed. Try again.");
options.error("There was an error retrieving the latest weather information. Please try again.");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simpleweather.js",
"version": "2.1",
"version": "2.1.1",
"title": "simpleWeather.js",
"author": {
"name": "James Fleeting",
Expand Down
2 changes: 1 addition & 1 deletion simpleweather.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"monkeecreate",
"weather data"
],
"version": "2.1",
"version": "2.1.1",
"author": {
"name": "James Fleeting",
"email": "hello@jamesfleeting.com",
Expand Down

0 comments on commit 1de2ceb

Please sign in to comment.