Skip to content

Instantly share code, notes, and snippets.

@SolarGeeks
SolarGeeks / index.html
Created April 29, 2017 11:05
Html Code
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script type="text/javascript" src="effects.js"></script>
</head>
<body>
@SolarGeeks
SolarGeeks / styles.css
Created April 29, 2017 11:03
Styles for website (along with the bootstrap in the html)
/* Basic reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
/* Better text styling */
font: bold 14px Arial, sans-serif;
}
@SolarGeeks
SolarGeeks / Button logic.js
Created April 29, 2017 11:03
Javascript Logic and data (originally one file)
for(var i = 0; i < keys.length; i++) {
keys[i].onclick = function(e) {
// Get the input and button values
var result = document.querySelector('#result');
var input = document.querySelector('.screen');
var inputVal = input.innerHTML;
var id = '#' + this.getAttribute('id');
var btnVal = this.innerHTML;
console.log(btnVal);