Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified README.md
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions css/styles.css
100644 → 100755
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body{
background-color: #33CCFF;
}
Binary file added images/snowflakes.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/spring.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sun.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions index.html
100644 → 100755
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<title>Temperature Conversions</title>
<link rel="stylesheet" href="css/styles.css" media="screen" type="text/css"/>
</head>
<body>
<h1>Welcome to the Temperature Conversion page!</h1>
<h2>Enter any desired temperature in Celsius to convert to Farenheit!</h2>
<div>
<input id="newEntry" autofocus placeholder="Temperature">
<input type="submit" id="submitBtn">
<h1> Result: </h1>
<h3 id="result1"></h3>
</div>
<script src="js/jquery-2.1.4.js"></script>
<script src="js/index.js"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions js/index.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
$(function(){

$('#submitBtn').click(ConvertTemp)

function ConvertTemp(event){
event.preventDefault();
var celsiusInput = parseInt($('#newEntry').val());
var result1Val = (celsiusInput *(9/5)) + 32;


$('#result1').html(result1Val);

if (result1Val >85){
$('body').css('background',"url(images/sun.jpeg");
} else if (result1Val >32){
$('body').css('background',"url(images/spring.jpg");
} else if (result1Val <= 32){
$('body').css('background',"url(images/snowflakes.jpg");
}
}

});
Loading