LocalWeatherApp
How do I make an localweatherapp?
What is a localweatherapp? How do you make a localweatherapp? This script and codes were developed by Hong on 21 October 2022, Friday.
LocalWeatherApp - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>LocalWeatherApp</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container-fluid"> <div class="a text-center"> <h1>Local Weather App<h1> <h3 class="location"></h3> <h2 class="temp1"></h2> <h2 class="temp2"></h2> <h2 class="weather"></h2> <div class="icon"></div> </div>
</div> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
LocalWeatherApp - Script Codes CSS Codes
body { background-color: #69c;
}
div.a { position: relative; top: 20px;
}
LocalWeatherApp - Script Codes JS Codes
$(document).ready(function() { $.getJSON("http://ipinfo.io", function(response) { $(".location").html(response.city + ", " + response.region + ", " + response.country); var zip = response.postal; var country = response.country; $.getJSON("http://api.openweathermap.org/data/2.5/weather?zip=" + zip + "," + country + "&APPID=4ca247b54b4eb71e942ca40585468d7d", function(json) { var K = json.main.temp; var F = Math.round((K - 273.15) * 9 / 5 + 32); var C = Math.round(K - 273.15); $(".temp1").html(JSON.stringify(F) + " °" + '<span class="unit">' + "F".fontcolor("yellow") + "</span>"); $(".temp2").html(JSON.stringify(C) + " °" + '<span class="unit">' + "C".fontcolor("yellow") + "</span>"); $(".temp2").hide(); $(".unit").click(function() { $(".temp1, .temp2").toggle(); }); $(".weather").text(json.weather[0].main); var icon=json.weather[0].icon; $(".icon").html('<img class="icon-size" src="http://openweathermap.org/img/w/'+icon+'.png">'); $(".icon-size").css("height","150px"); }); });
});
Developer | Hong |
Username | designbuildshipsoftware |
Uploaded | October 21, 2022 |
Rating | 3 |
Size | 2,186 Kb |
Views | 16,192 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Canvas | 0 Kb |
Personal Portfolio of Hong2 | 0 Kb |
Tabs | 2,741 Kb |
WikipediaViewer | 2,383 Kb |
Pomodoro Clock | 2,764 Kb |
Pomodoro Clock2 | 0 Kb |
Pomodoro Clock8 | 0 Kb |
ContractVehicles | 1,631 Kb |
WikipediaViewer1 | 2,276 Kb |
Personal Portfolio of Hong | 3,487 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Elon Musk - Tribute Page - FreeCodeCamp | Yunnimun | 8,615 Kb |
Cut and Paste Roll Link | BottomlineInteractive | 2,546 Kb |
Fixed with using Calc | Tomleo | 2,542 Kb |
Tab Menus | Zephyr | 3,180 Kb |
Sass Get Function | Lukewatts | 2,155 Kb |
SVG email test v2.0 | M_J_Robbins | 2,090 Kb |
Direction-icon | Alexandremasy | 3,323 Kb |
Cant get enough icecream in pure css3 | Melawire | 4,322 Kb |
Michelle, submit your photography to Unsplash. | Zaneriley | 3,368 Kb |
Virtual vinyl | Davidpanik | 3,474 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!