Created
September 30, 2014 06:40
-
-
Save plusjade/9d5c750b9acccbb2f780 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello</title> | |
<style> | |
h1 { color: red; } | |
</style> | |
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'></script> | |
</head> | |
<body> | |
<h1>My site</h1> | |
<input name="jade" value="5"/> | |
<button id="myBtn">Update</button> | |
<h2>Hello</h2> | |
<script> | |
$( "#myBtn" ).click( function() { | |
console.log( "I have been clicked!!!!" ); | |
run(); | |
doSomethingElse(); | |
}); | |
function run() { | |
var number = $('input').val(); | |
console.log(number); | |
// number converter | |
var farenheit = (number * 1.8) + 32; | |
console.log(farenheit); | |
$('h1').html(farenheit) | |
} | |
function doSomethingElse() { | |
// some complicated code | |
console.log('complicated code') | |
} | |
run(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment