This snippet makes it easy to drop in basic horizontal bars, or progress reports.
$('#sample').progressreport(100,50,'%1 (%3%) of goal reached.');
Simple jQuery snippet to get the selected options from a select box using $(this):
$(this).children(':selected').each(function() {
// handle $(this) selected option
});
JavaScript does not provide an isFloat() function.
Here is a dead simple isFloat() example, this works well for most client side quick-checks.
I don't recommend doing client-side validation.
function isFloat(value){
if(isNaN(value) || value.indexOf(".")<0){
return false;
} else {
if(parseFloat(value)) {
return true;
} else {
return false;
}
}
}