Monday, May 25, 2020

jQuery Weather.js Plugin

Hello guys! Welcome to a new section of my tutorials on jQuery. In this tutorial post, i will be discussing about the jQuery Weather.js plugin.

jQuery Weather.js is a jQuery plugin that is used for finding information about weather details.


Below is a simple Weather.js example -

<!DOCTYPE html>
<html lang = "en">
      <meta charset = "UTF-8">
      <meta name = "viewport" content = "width = device-width, 
         initial-scale = 1">
      <link rel = "stylesheet" 
         href = "">
      <link rel = "stylesheet" 
         href = "">
      <link href = ',300,600,700'
         rel = 'stylesheet' type = 'text/css'>
      <link rel = "stylesheet" type = "text/css" href = "weather.css">
   <body id = "weather-background" class = "default-weather">
      <canvas id = "rain-canvas"></canvas>
      <canvas id = "cloud-canvas"></canvas>
      <canvas id = "weather-canvas"></canvas>
      <canvas id = "time-canvas"></canvas>
      <canvas id = "lightning-canvas"></canvas>
      <div class = "page-wrap">
         <header class = "search-bar">
            <p class = "search-text">
               <span class = "search-location-text">
                  What's the weather like in 
                  <input id = "search-location-input" 
                     class = "search-location-input" type = "text"
                     placeholder = "City"> ?
            <div class = "search-location-button-group">
               <button id = "search-location-button" 
                  class = "fa fa-search search-location-button search-button">
               <!--  -->
               <button id = "geo-button" class = "geo-button fa
                  fa-location-arrow search-button"></button>

         <div id = "geo-error-message" class = "geo-error-message hide">
            <button id = 'close-error' class = 'fa fa-times 
               close-error'></button>Uh oh! It looks like we can't 
               find your location. Please type your city into the search 
               box above!

         <div id = "front-page-description" 
      class = "front-page-description middle">
            <h1>Blank Canvas Weather</h1>
         <div class = "attribution-links hide" id = "attribution-links">
            <button id = 'close-attribution' 
               class = 'fa fa-times close-attribution'></button>
            <h3>Icons from <a href = "">
               Noun Project</a></h3>
               <li class = "icon-attribution">
                  <a href = "">
                  Cloud</a> by Pieter J. Smits</li>
               <li class = "icon-attribution">
                  <a href = "">
                  Snow</a> from National Park Service Collection</li>
               <li class = "icon-attribution">
                  <a href = "">
                  Drop</a> Alex Fuller</li>
               <li class = "icon-attribution">
                  <a href = "">
                  Smoke</a> by Gerardo Martín Martínez</li>
               <li class = "icon-attribution">
                  <a href = "">
                  Moon</a> by Jory Raphael</li>
               <li class = "icon-attribution">
                  <a href = "">
                  Warning</a> by Icomatic</li>
               <li class = "icon-attribution">
                  <a href = "">
                  Sun</a> by Jory Raphael</li>
               <li class = "icon-attribution">
                  <a href = "">
                  Windsock</a> by Golden Roof</li>
         <div id = "weather" class = "weather middle hide">
            <div class = "location" id = "location"></div>
               <div class = "weather-container">
                  <div id = "temperature-info" class = "temperature-info">
                     <div class = "temperature" id = "temperature">
                     <div class = "weather-description" id = "weather-description">
                  <div class = "weather-box">
                     <ul class = "weather-info" id = "weather-info">
                        <li class = "weather-item humidity">Humidity:
                           <span id = "humidity"></span>%</li><!---->
                        <li class = "weather-item wind">Wind: <span 
                           id = "wind-direction"></span> <span 
                           id = "wind"></span> <span 
                           id = "speed-unit"></span></li>
                  <div class = "temp-change">
                     <button id = "celsius" 
                        class = "temp-change-button celsius">°C
                        </button><button id = "fahrenheit" 
                        class = "temp-change-button fahrenheit">
            src = "">
         <script src = "weather.js">

RECOMMENDED POST: jQuery Megadropdown Plugin

Alright guys! This is where we are wrapping it up with this tutorial. In my next tutorial post, i will be starting my tutorials on Wordpress. Feel free to ask your questions where necessary and i will attend to them as soon as possible.

If you found this tutorial helpful and interesting, kindly use the share button to share this tutorial. Follow us on our various social media platforms available to stay updated with our latest posts. Also subscribe to our newsletter to get all our tutorials delivered directly to your emails.

Thanks for reading and bye for now.


Post a Comment

Hello dear readers! Please kindly try your best to make sure your comments comply with our comment policy guidelines. You can visit our comment policy page to view these guidelines which are clearly stated. Thank you.