Created
June 14, 2015 17:55
-
-
Save hayes0724/2543d1e74a094ec4fbde to your computer and use it in GitHub Desktop.
Tiling/Flooring Calculator
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
function cal() { | |
// Get total square feet to cover | |
var sf = document.getElementById('sf').value; | |
console.log(sf) | |
// Get tile size | |
var tileSize = document.getElementById('tileSize').value; | |
console.log(tileSize) | |
// Convert area to inches and divide by a single tile's area (ex 4x4 tile = 16), then divide by 144 to determine tiles needed. | |
var total = (sf * 144)/tileSize; | |
console.log(total) | |
// Add 10% for waste | |
var totalWaste = total * 1.1; | |
console.log(totalWaste) | |
// Output results | |
document.getElementById('total').innerHTML = total; | |
document.getElementById('totalSF').innerHTML = sf; | |
document.getElementById('totalWaste').innerHTML = totalWaste; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My time on your website was quite long. And saw the message you sent. It was fantastic. Let me add that Solutions is the epitome of strength and style in the vibrant commercial epoxy flooring Raleigh company area. For your business, our expert installation provides a strong and aesthetically pleasing foundation. Our flooring offers personalized solutions to meet your specific needs, ensuring a safe and professional environment.