File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,13 @@ $(document).ready(function () {
2121 let imgPath = "images/error.png" ;
2222
2323 switch ( true ) {
24+ case desc . includes ( "clear" ) :
2425 case desc . includes ( "sunny" ) :
2526 imgPath = "images/sunny.png" ;
2627 break ;
28+ case desc . includes ( "overcast" ) :
29+ imgPath = "images/overcast.png" ;
30+ break ;
2731 case desc . includes ( "cloudy" ) :
2832 imgPath = "images/cloudy.png" ;
2933 break ;
@@ -46,9 +50,9 @@ $(document).ready(function () {
4650
4751 //Update weather Container
4852 $ ( "#cityName" ) . text ( city ) ;
49- $ ( "#temp" ) . text ( `Temperature : ${ temp } °C` ) ; //Temperature
50- $ ( "#desc" ) . text ( `Description : ${ desc } ` ) ; //Description
51- $ ( "#hum" ) . text ( `Humidity : ${ humidity } %` ) ; //Humidity
53+ $ ( "#temp" ) . text ( `Temp : ${ temp } °C` ) ; //Temperature
54+ $ ( "#desc" ) . text ( `Desc : ${ desc } ` ) ; //Description
55+ $ ( "#hum" ) . text ( `Hum : ${ humidity } %` ) ; //Humidity
5256
5357 //Link weather icon
5458 $ ( "#weatherIcon" ) . attr ( "src" , imgPath ) ;
You can’t perform that action at this time.
0 commit comments