Created
February 23, 2011 23:56
-
-
Save mattkruskamp/841468 to your computer and use it in GitHub Desktop.
Calling the dive
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
// standard jquery self-calling function | |
jQuery(function () { | |
// get the elements | |
var psiIn = $("#psiIn"), | |
psiOut = $("#psiOut"), | |
time = $("#time"), | |
depth = $("#depth"), | |
tankVolume = $("#tankVolume"), | |
tankWorkingPsi = $("#tankWorkingPsi"), | |
finalLabel = $("#rate"), | |
submitButton = $("#submitQuery"); | |
// when you click the submit button | |
submitButton.live("click", function () { | |
// get the sac rate | |
var final = DevelopLive.Dive.calcSac( | |
psiIn.val(), psiOut.val(), time.val(), | |
depth.val(), tankVolume.val(), tankWorkingPsi.val()); | |
// set the rate | |
finalLabel.text(final); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment