Mulch Calculator using jQuery
According to Wikipedia:
As with any language on the web (and spoken languages, too), you can do some cool stuff even without being completely fluent in it. Thought I haven’t been using jQuery very long, I’ve already completed two projects with it.
My latest project was to build a mulch calculator that would help the user to know how many yards of mulch they will need to fill a certain spot. The user needs to know 3 things:
- Length in Feet
- Width in Feet
- Thickness in Inches
Here’s the formula for calculating what you need:
(Length * Width * (Thickness / 12)) / 27
You’ll notice that there is a semi-complex order of operations going on here
- First we have to convert the inches to be on the same playing field as the feet by dividing by 12.
- Then we have multiply length, width and our converted thickness together.
- And lastly, all of that is divided by 27.
The actual calculator can be found here: www.adamslandscapingandsupply.com/calculators