{"size": 456, "ext": "js", "max_stars_repo_path": "tempForZip/public/main.js", "max_stars_repo_name": "Sriee/jsworkbook", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tempForZip/public/main.js", "max_issues_repo_name": "Sriee/jsworkbook", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tempForZip/public/main.js", "max_forks_repo_name": "Sriee/jsworkbook", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.24, "max_line_length": 71, "alphanum_fraction": 0.5153508772}
$(function() {
	var $h1 = $("h1");
	var $zip = $("input[name='zip']");

	$("form").on("submit", function(event) {
		event.preventDefault();

		var zipcode = $.trim($zip.val());
		$h1.text("Loading...");

		var request = $.ajax({
			url: "/" + zipcode,
			dataType: "json"
		});

		request.done(function(data) {
			$h1.html("It's " + data.temperature + "&#176; in " + zipcode + ".");
		});

		request.fail(function(){
			$h1.text("Error!.");
		});
	});

});