nutrition-label-jquery-plugin
Version:
To be able to create a FDA-style nutrition label with any nutrition data source
1,069 lines (966 loc) • 50.6 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<link rel='stylesheet' type='text/css' media='all' href='../nutritionLabel-min.css'>
<style>
body{
font-size: 13px;
background-color: white;
padding: 5px;
margin: 0;
}
label, input[type="radio"]{
cursor: pointer;
}
input[type="radio"]{
margin-right: -2px;
}
label{
font-weight: bold;
}
input.nutriValue, input.nutriUnit, input.nutriMiscValue, input.nutriMiscValue2, input.nutriMiscValue3, input.nutriMiscValue4{
width: 40px;
font-weight: 13px;
padding: 2px;
margin-left: 5px;
text-align: right;
}
input.nutriUnit{
width: 30px;
}
input.nutriMiscValue{
width: 40px;
}
input.nutriMiscValue2{
width: 30px;
}
input.nutriMiscValue3{
width: 215px;
}
input.nutriMiscValue4{
width: 150px;
}
input.w100{
width: 100px;
}
input.w120{
width: 120px;
}
input.w180{
width: 180px;
}
input.w220{
width: 220px;
}
div#main{
width: 1410px;
position: relative;
padding: 0;
height: auto;
}
div#col1, div#col2, div#col3, div#col4, div#col5, div#col6, div#generatedLabel{
width: 275px;
float: left;
height: 830px;
}
div#col2{
width: 215px;
height: 580px;
}
div#col3{
width: 205px;
height: 580px;
}
div#col4{
width: 205px;
height: 690px;
}
div#col5{
width: 240px;
height: 770px;
}
div#col6{
width: 255px;
height: 970px;
}
div#generatedLabel{
position: absolute;
width: 410px;
height: auto;
top: 580px;
left: 275px;
}
b.note{
color: red;
font-size: 14px;
}
div.h5{
height: 5px;
}
div.h10{
height: 10px;
}
b.f20{
font-size: 20px;
}
</style>
</head>
<body>
<div id="main">
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<div id="col1">
<b class="note">Miscellaneous Settings</b><div class="h10"></div>
<div>
<b>Allow Custom Width</b>
<input type="radio" id="allowCustomWidth_yes" name="allowCustomWidth" value="1">
<label for="allowCustomWidth_yes">Y</label>
<input type="radio" id="allowCustomWidth_no" name="allowCustomWidth" value="0" checked>
<label for="allowCustomWidth_no">N</label><div class="h5"></div>
</div>
<div>
<b>Allow No Border</b>
<input type="radio" id="allowNoBorder_yes" name="allowNoBorder" value="1">
<label for="allowNoBorder_yes">Y</label>
<input type="radio" id="allowNoBorder_no" name="allowNoBorder" value="0" checked>
<label for="allowNoBorder_no">N</label><div class="h10"></div>
</div>
<div>
<b>Allow FDA Rounding</b>
<input type="radio" id="allowFDARounding_yes" name="allowFDARounding" value="1">
<label for="allowFDARounding_yes">Y</label>
<input type="radio" id="allowFDARounding_no" name="allowFDARounding" value="0" checked>
<label for="allowFDARounding_no">N</label><div class="h10"></div>
</div>
<div>
<b>Scroll Long Ingredients</b>
<input type="radio" id="scrollLongIngredients_yes" name="scrollLongIngredients" value="1">
<label for="scrollLongIngredients_yes">Y</label>
<input type="radio" id="scrollLongIngredients_no" name="scrollLongIngredients" value="0" checked>
<label for="scrollLongIngredients_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Bottom Link</b>
<input type="radio" id="showBottomLink_yes" name="showBottomLink" value="1">
<label for="showBottomLink_yes">Y</label>
<input type="radio" id="showBottomLink_no" name="showBottomLink" value="0" checked>
<label for="showBottomLink_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Amount Per Serving</b>
<input type="radio" id="showAmountPerServing_yes" name="showAmountPerServing" value="1" checked>
<label for="showAmountPerServing_yes">Y</label>
<input type="radio" id="showAmountPerServing_no" name="showAmountPerServing" value="0">
<label for="showAmountPerServing_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Servings Per Container</b>
<input type="radio" id="showServingsPerContainer_yes" name="showServingsPerContainer" value="1" checked>
<label for="showServingsPerContainer_yes">Y</label>
<input type="radio" id="showServingsPerContainer_no" name="showServingsPerContainer" value="0">
<label for="showServingsPerContainer_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Item Name</b>
<input type="radio" id="showItemName_yes" name="showItemName" value="1" checked>
<label for="showItemName_yes">Y</label>
<input type="radio" id="showItemName_no" name="showItemName" value="0">
<label for="showItemName_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Item Name At The Top</b>
<input type="radio" id="showItemNameAtTheTop_yes" name="showItemNameAtTheTop" value="1" checked>
<label for="showItemNameAtTheTop_yes">Y</label>
<input type="radio" id="showItemNameAtTheTop_no" name="showItemNameAtTheTop" value="0">
<label for="showItemNameAtTheTop_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Brand Name</b>
<input type="radio" id="showBrandName_yes" name="showBrandName" value="1" checked>
<label for="showBrandName_yes">Y</label>
<input type="radio" id="showBrandName_no" name="showBrandName" value="0">
<label for="showBrandName_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Ingredients</b>
<input type="radio" id="showIngredients_yes" name="showIngredients" value="1" checked>
<label for="showIngredients_yes">Y</label>
<input type="radio" id="showIngredients_no" name="showIngredients" value="0">
<label for="showIngredients_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Calorie Diet</b>
<input type="radio" id="showCalorieDiet_yes" name="showCalorieDiet" value="1" checked>
<label for="showCalorieDiet_yes">Y</label>
<input type="radio" id="showCalorieDiet_no" name="showCalorieDiet" value="0">
<label for="showCalorieDiet_no">N</label><div class="h10"></div>
</div>
<b class="note">More Settings</b><div class="h10"></div>
<div>
<label for="width">Width</label>
<input type="text" id="width" name="width" value="260" class="nutriMiscValue2"><div class="h10"></div>
</div>
<div>
<label for="widthCustom">Width Custom</label>
<input type="text" id="widthCustom" name="widthCustom" value="auto" class="nutriMiscValue2"><div class="h10"></div>
</div>
<div>
<label for="scrollHeightComparison">Scroll Height Comparison</label>
<input type="text" id="scrollHeightComparison" name="scrollHeightComparison" value="100" class="nutriMiscValue2"><div class="h10"></div>
</div>
<div>
<label for="scrollHeightPixel">Scroll Height Pixel</label>
<input type="text" id="scrollHeightPixel" name="scrollHeightPixel" value="95" class="nutriMiscValue2"><div class="h10"></div>
</div>
<div>
<label for="decimalPlacesForNutrition">Decimal Places for Nutrition</label>
<input type="text" id="decimalPlacesForNutrition" name="decimalPlacesForNutrition" value="1" class="nutriMiscValue2"><div class="h10"></div>
</div>
<div>
<label for="decimalPlacesForDailyValues">Decimal Places for Daily Values</label>
<input type="text" id="decimalPlacesForDailyValues" name="decimalPlacesForDailyValues" value="0" class="nutriMiscValue2"><div class="h10"></div>
</div>
<div>
<label for="urlBottomLink">URL of Bottom Link</label><div class="h5"></div>
<input type="text" id="urlBottomLink" name="urlBottomLink" value="http://www.nutritionix.com" class="nutriMiscValue3"><div class="h10"></div>
</div>
<div>
<label for="nameBottomLink">Name of Bottom Link</label><div class="h5"></div>
<input type="text" id="nameBottomLink" name="nameBottomLink" value="Nutritionix" class="nutriMiscValue3"><div class="h10"></div>
</div>
<div>
<label for="itemName">Item Name</label><div class="h5"></div>
<input type="text" id="itemName" name="itemName" value="Item / Ingredient Name" class="nutriMiscValue3"><div class="h10"></div>
</div>
<div>
<label for="brandName">Brand Name</label><div class="h5"></div>
<input type="text" id="brandName" name="brandName" value="Brand where this item belongs to" class="nutriMiscValue3"><div class="h10"></div>
</div>
</div>
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<div id="col2">
<b class="note">Show/Hide Values</b><div class="h10"></div>
<div>
<b>Show Serving Size</b>
<input type="radio" id="showServingUnitQuantity_yes" name="showServingUnitQuantity" value="1" checked>
<label for="showServingUnitQuantity_yes">Y</label>
<input type="radio" id="showServingUnitQuantity_no" name="showServingUnitQuantity" value="0">
<label for="showServingUnitQuantity_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Calories</b>
<input type="radio" id="showCalories_yes" name="showCalories" value="1" checked>
<label for="showCalories_yes">Y</label>
<input type="radio" id="showCalories_no" name="showCalories" value="0">
<label for="showCalories_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Fat Calories</b>
<input type="radio" id="showFatCalories_yes" name="showFatCalories" value="1" checked>
<label for="showFatCalories_yes">Y</label>
<input type="radio" id="showFatCalories_no" name="showFatCalories" value="0">
<label for="showFatCalories_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Total Fat</b>
<input type="radio" id="showTotalFat_yes" name="showTotalFat" value="1" checked>
<label for="showTotalFat_yes">Y</label>
<input type="radio" id="showTotalFat_no" name="showTotalFat" value="0">
<label for="showTotalFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Saturated Fat</b>
<input type="radio" id="showSatFat_yes" name="showSatFat" value="1" checked>
<label for="showSatFat_yes">Y</label>
<input type="radio" id="showSatFat_no" name="showSatFat" value="0">
<label for="showSatFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Trans Fat</b>
<input type="radio" id="showTransFat_yes" name="showTransFat" value="1" checked>
<label for="showTransFat_yes">Y</label>
<input type="radio" id="showTransFat_no" name="showTransFat" value="0">
<label for="showTransFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Poly Fat</b>
<input type="radio" id="showPolyFat_yes" name="showPolyFat" value="1" checked>
<label for="showPolyFat_yes">Y</label>
<input type="radio" id="showPolyFat_no" name="showPolyFat" value="0">
<label for="showPolyFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Mono Fat</b>
<input type="radio" id="showMonoFat_yes" name="showMonoFat" value="1" checked>
<label for="showMonoFat_yes">Y</label>
<input type="radio" id="showMonoFat_no" name="showMonoFat" value="0">
<label for="showMonoFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Cholesterol</b>
<input type="radio" id="showCholesterol_yes" name="showCholesterol" value="1" checked>
<label for="showCholesterol_yes">Y</label>
<input type="radio" id="showCholesterol_no" name="showCholesterol" value="0">
<label for="showCholesterol_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Sodium</b>
<input type="radio" id="showSodium_yes" name="showSodium" value="1" checked>
<label for="showSodium_yes">Y</label>
<input type="radio" id="showSodium_no" name="showSodium" value="0">
<label for="showSodium_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Total Carb</b>
<input type="radio" id="showTotalCarb_yes" name="showTotalCarb" value="1" checked>
<label for="showTotalCarb_yes">Y</label>
<input type="radio" id="showTotalCarb_no" name="showTotalCarb" value="0">
<label for="showTotalCarb_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Fibers</b>
<input type="radio" id="showFibers_yes" name="showFibers" value="1" checked>
<label for="showFibers_yes">Y</label>
<input type="radio" id="showFibers_no" name="showFibers" value="0">
<label for="showFibers_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Sugars</b>
<input type="radio" id="showSugars_yes" name="showSugars" value="1" checked>
<label for="showSugars_yes">Y</label>
<input type="radio" id="showSugars_no" name="showSugars" value="0">
<label for="showSugars_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Proteins</b>
<input type="radio" id="showProteins_yes" name="showProteins" value="1" checked>
<label for="showProteins_yes">Y</label>
<input type="radio" id="showProteins_no" name="showProteins" value="0">
<label for="showProteins_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Vitamin A</b>
<input type="radio" id="showVitaminA_yes" name="showVitaminA" value="1" checked>
<label for="showVitaminA_yes">Y</label>
<input type="radio" id="showVitaminA_no" name="showVitaminA" value="0">
<label for="showVitaminA_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Vitamin C</b>
<input type="radio" id="showVitaminC_yes" name="showVitaminC" value="1" checked>
<label for="showVitaminC_yes">Y</label>
<input type="radio" id="showVitaminC_no" name="showVitaminC" value="0">
<label for="showVitaminC_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Calcium</b>
<input type="radio" id="showCalcium_yes" name="showCalcium" value="1" checked>
<label for="showCalcium_yes">Y</label>
<input type="radio" id="showCalcium_no" name="showCalcium" value="0">
<label for="showCalcium_no">N</label><div class="h10"></div>
</div>
<div>
<b>Show Iron</b>
<input type="radio" id="showIron_yes" name="showIron" value="1" checked>
<label for="showIron_yes">Y</label>
<input type="radio" id="showIron_no" name="showIron" value="0">
<label for="showIron_no">N</label><div class="h10"></div>
</div>
</div>
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<div id="col3">
<b class="note">N/A Settings</b><div class="h10"></div>
<div>
<b>N/A Serving Size</b>
<input type="radio" id="naServingUnitQuantity_yes" name="naServingUnitQuantity" value="1">
<label for="naServingUnitQuantity_yes">Y</label>
<input type="radio" id="naServingUnitQuantity_no" name="naServingUnitQuantity" value="0" checked>
<label for="naServingUnitQuantity_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Calories</b>
<input type="radio" id="naCalories_yes" name="naCalories" value="1">
<label for="naCalories_yes">Y</label>
<input type="radio" id="naCalories_no" name="naCalories" value="0" checked>
<label for="naCalories_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Fat Calories</b>
<input type="radio" id="naFatCalories_yes" name="naFatCalories" value="1">
<label for="naFatCalories_yes">Y</label>
<input type="radio" id="naFatCalories_no" name="naFatCalories" value="0" checked>
<label for="naFatCalories_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Total Fat</b>
<input type="radio" id="naTotalFat_yes" name="naTotalFat" value="1">
<label for="naTotalFat_yes">Y</label>
<input type="radio" id="naTotalFat_no" name="naTotalFat" value="0" checked>
<label for="naTotalFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Saturated Fat</b>
<input type="radio" id="naSatFat_yes" name="naSatFat" value="1">
<label for="naSatFat_yes">Y</label>
<input type="radio" id="naSatFat_no" name="naSatFat" value="0" checked>
<label for="naSatFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Trans Fat</b>
<input type="radio" id="naTransFat_yes" name="naTransFat" value="1">
<label for="naTransFat_yes">Y</label>
<input type="radio" id="naTransFat_no" name="naTransFat" value="0" checked>
<label for="naTransFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Poly Fat</b>
<input type="radio" id="naPolyFat_yes" name="naPolyFat" value="1">
<label for="naPolyFat_yes">Y</label>
<input type="radio" id="naPolyFat_no" name="naPolyFat" value="0" checked>
<label for="naPolyFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Mono Fat</b>
<input type="radio" id="naMonoFat_yes" name="naMonoFat" value="1">
<label for="naMonoFat_yes">Y</label>
<input type="radio" id="naMonoFat_no" name="naMonoFat" value="0" checked>
<label for="naMonoFat_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Cholesterol</b>
<input type="radio" id="naCholesterol_yes" name="naCholesterol" value="1">
<label for="naCholesterol_yes">Y</label>
<input type="radio" id="naCholesterol_no" name="naCholesterol" value="0" checked>
<label for="naCholesterol_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Sodium</b>
<input type="radio" id="naSodium_yes" name="naSodium" value="1">
<label for="naSodium_yes">Y</label>
<input type="radio" id="naSodium_no" name="naSodium" value="0" checked>
<label for="naSodium_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Total Carb</b>
<input type="radio" id="naTotalCarb_yes" name="naTotalCarb" value="1">
<label for="naTotalCarb_yes">Y</label>
<input type="radio" id="naTotalCarb_no" name="naTotalCarb" value="0" checked>
<label for="naTotalCarb_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Fibers</b>
<input type="radio" id="naFibers_yes" name="naFibers" value="1">
<label for="naFibers_yes">Y</label>
<input type="radio" id="naFibers_no" name="naFibers" value="0" checked>
<label for="naFibers_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Sugars</b>
<input type="radio" id="naSugars_yes" name="naSugars" value="1">
<label for="naSugars_yes">Y</label>
<input type="radio" id="naSugars_no" name="naSugars" value="0" checked>
<label for="naSugars_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Proteins</b>
<input type="radio" id="naProteins_yes" name="naProteins" value="1">
<label for="naProteins_yes">Y</label>
<input type="radio" id="naProteins_no" name="naProteins" value="0" checked>
<label for="naProteins_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Vitamin A</b>
<input type="radio" id="naVitaminA_yes" name="naVitaminA" value="1">
<label for="naVitaminA_yes">Y</label>
<input type="radio" id="naVitaminA_no" name="naVitaminA" value="0" checked>
<label for="naVitaminA_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Vitamin C</b>
<input type="radio" id="naVitaminC_yes" name="naVitaminC" value="1">
<label for="naVitaminC_yes">Y</label>
<input type="radio" id="naVitaminC_no" name="naVitaminC" value="0" checked>
<label for="naVitaminC_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Calcium</b>
<input type="radio" id="naCalcium_yes" name="naCalcium" value="1">
<label for="naCalcium_yes">Y</label>
<input type="radio" id="naCalcium_no" name="naCalcium" value="0" checked>
<label for="naCalcium_no">N</label><div class="h10"></div>
</div>
<div>
<b>N/A Iron</b>
<input type="radio" id="naIron_yes" name="naIron" value="1">
<label for="naIron_yes">Y</label>
<input type="radio" id="naIron_no" name="naIron" value="0" checked>
<label for="naIron_no">N</label><div class="h10"></div>
</div>
</div>
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<div id="col4">
<b class="note">Nutrition => Value => Unit</b><div class="h10"></div>
<div>
<label for="valueServingUnitQuantity">Serving Size</label>
<input type="text" id="valueServingUnitQuantity" name="valueServingUnitQuantity" value="0" class="nutriValue">
<input type="text" id="valueServingSizeUnit" name="valueServingSizeUnit" value="" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueServingWeightGrams">Serving Weight Grams</label>
<input type="text" id="valueServingWeightGrams" name="valueServingWeightGrams" value="0" class="nutriValue"><div class="h10"></div>
</div>
<div>
<label for="valueServingPerContainer">Serving Per Container</label>
<input type="text" id="valueServingPerContainer" name="valueServingPerContainer" value="1" class="nutriValue"><div class="h10"></div>
</div>
<div>
<label for="valueCalories">Calories</label>
<input type="text" id="valueCalories" name="valueCalories" value="0" class="nutriValue">
<input type="text" id="unitCalories" name="unitCalories" value="" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueFatCalories">Fat Calories</label>
<input type="text" id="valueFatCalories" name="valueFatCalories" value="0" class="nutriValue">
<input type="text" id="unitFatCalories" name="unitFatCalories" value="" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueTotalFat">Total Fat</label>
<input type="text" id="valueTotalFat" name="valueTotalFat" value="0" class="nutriValue">
<input type="text" id="unitTotalFat" name="unitTotalFat" value="g" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueSatFat">Sat Fat</label>
<input type="text" id="valueSatFat" name="valueSatFat" value="0" class="nutriValue">
<input type="text" id="unitSatFat" name="unitSatFat" value="g" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueTransFat">Trans Fat</label>
<input type="text" id="valueTransFat" name="valueTransFat" value="0" class="nutriValue">
<input type="text" id="unitTransFat" name="unitTransFat" value="g" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valuePolyFat">Poly Fat</label>
<input type="text" id="valuePolyFat" name="valuePolyFat" value="0" class="nutriValue">
<input type="text" id="unitPolyFat" name="unitPolyFat" value="g" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueMonoFat">Mono Fat</label>
<input type="text" id="valueMonoFat" name="valueMonoFat" value="0" class="nutriValue">
<input type="text" id="unitMonoFat" name="unitMonoFat" value="g" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueCholesterol">Cholesterol</label>
<input type="text" id="valueCholesterol" name="valueCholesterol" value="0" class="nutriValue">
<input type="text" id="unitCholesterol" name="unitCholesterol" value="mg" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueSodium">Sodium</label>
<input type="text" id="valueSodium" name="valueSodium" value="0" class="nutriValue">
<input type="text" id="unitSodium" name="unitSodium" value="mg" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueTotalCarb">Total Carb</label>
<input type="text" id="valueTotalCarb" name="valueTotalCarb" value="0" class="nutriValue">
<input type="text" id="unitTotalCarb" name="unitTotalCarb" value="g" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueFibers">Fibers</label>
<input type="text" id="valueFibers" name="valueFibers" value="0" class="nutriValue">
<input type="text" id="unitFibers" name="unitFibers" value="g" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueSugars">Sugars</label>
<input type="text" id="valueSugars" name="valueSugars" value="0" class="nutriValue">
<input type="text" id="unitSugars" name="unitSugars" value="g" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueProteins">Proteins</label>
<input type="text" id="valueProteins" name="valueProteins" value="0" class="nutriValue">
<input type="text" id="unitProteins" name="unitProteins" value="g" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueVitaminA">Vitamin A</label>
<input type="text" id="valueVitaminA" name="valueVitaminA" value="0" class="nutriValue">
<input type="text" id="unitVitaminA" name="unitVitaminA" value="%" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueVitaminC">Vitamin C</label>
<input type="text" id="valueVitaminC" name="valueVitaminC" value="0" class="nutriValue">
<input type="text" id="unitVitaminC" name="unitVitaminC" value="%" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueCalcium">Calcium</label>
<input type="text" id="valueCalcium" name="valueCalcium" value="0" class="nutriValue">
<input type="text" id="unitCalcium" name="unitCalcium" value="%" class="nutriUnit"><div class="h10"></div>
</div>
<div>
<label for="valueIron">Iron</label>
<input type="text" id="valueIron" name="valueIron" value="0" class="nutriValue">
<input type="text" id="unitIron" name="unitIron" value="%" class="nutriUnit"><div class="h10"></div>
</div>
</div>
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<div id="col5">
<b class="note">For the Optional Calorie Diet</b><div class="h10"></div>
<div>
<label for="valueCol1CalorieDiet">Col 1 Calorie Diet</label>
<input type="text" id="valueCol1CalorieDiet" name="valueCol1CalorieDiet" value="2000" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol2CalorieDiet">Col 2 Calorie Diet</label>
<input type="text" id="valueCol2CalorieDiet" name="valueCol2CalorieDiet" value="2500" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol1DietaryTotalFat">Col 1 Dietary Total Fat</label>
<input type="text" id="valueCol1DietaryTotalFat" name="valueCol1DietaryTotalFat" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol2DietaryTotalFat">Col 2 Dietary Total Fat</label>
<input type="text" id="valueCol2DietaryTotalFat" name="valueCol2DietaryTotalFat" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol1DietarySatFat">Col 1 Dietary Sat Fat</label>
<input type="text" id="valueCol1DietarySatFat" name="valueCol1DietarySatFat" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol2DietarySatFat">Col 2 Dietary Sat Fat</label>
<input type="text" id="valueCol2DietarySatFat" name="valueCol2DietarySatFat" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol1DietaryCholesterol">Col 1 Dietary Cholesterol</label>
<input type="text" id="valueCol1DietaryCholesterol" name="valueCol1DietaryCholesterol" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol2DietaryCholesterol">Col 2 Dietary Cholesterol</label>
<input type="text" id="valueCol2DietaryCholesterol" name="valueCol2DietaryCholesterol" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol1DietarySodium">Col 1 Dietary Sodium</label>
<input type="text" id="valueCol1DietarySodium" name="valueCol1DietarySodium" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol2DietarySodium">Col 2 Dietary Sodium</label>
<input type="text" id="valueCol2DietarySodium" name="valueCol2DietarySodium" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol1DietaryTotalCarb">Col 1 Dietary Total Carb</label>
<input type="text" id="valueCol1DietaryTotalCarb" name="valueCol1DietaryTotalCarb" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol2DietaryTotalCarb">Col 2 Dietary Total Carb</label>
<input type="text" id="valueCol2DietaryTotalCarb" name="valueCol2DietaryTotalCarb" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol1Dietary">Col 1 Dietary</label>
<input type="text" id="valueCol1Dietary" name="valueCol1Dietary" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="valueCol2Dietary">Col 2 Dietary</label>
<input type="text" id="valueCol2Dietary" name="valueCol2Dietary" value="0" class="nutriMiscValue"><div class="h10"></div>
</div>
<b class="note">Default Calorie Intake</b><div class="h10"></div>
<div>
<label for="calorieIntake">Calorie Intake</label>
<input type="text" id="calorieIntake" name="calorieIntake" value="2000" class="nutriMiscValue"><div class="h10"></div>
</div>
<b class="note">Recommended Daily Intake</b><div class="h10"></div>
<div>
<label for="dailyValueTotalFat">Daily Value Total Fat</label>
<input type="text" id="dailyValueTotalFat" name="dailyValueTotalFat" value="65" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="dailyValueSatFat">Daily Value Sat Fat</label>
<input type="text" id="dailyValueSatFat" name="dailyValueSatFat" value="20" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="dailyValueCholesterol">Daily Value Cholesterol</label>
<input type="text" id="dailyValueCholesterol" name="dailyValueCholesterol" value="300" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="dailyValueSodium">Daily Value Sodium</label>
<input type="text" id="dailyValueSodium" name="dailyValueSodium" value="2400" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="dailyValueCarb">Daily Value Carb</label>
<input type="text" id="dailyValueCarb" name="dailyValueCarb" value="300" class="nutriMiscValue"><div class="h10"></div>
</div>
<div>
<label for="dailyValueFiber">Daily Value Fiber</label>
<input type="text" id="dailyValueFiber" name="dailyValueFiber" value="25" class="nutriMiscValue"><div class="h10"></div>
</div>
</div>
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<div id="col6">
<b class="note">More Text Settings</b><div class="h10"></div>
<div>
<label for="textNutritionFacts">Nutrition Facts</label>
<input type="text" id="textNutritionFacts" name="textNutritionFacts" value="Nutrition Facts" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textDailyValues">Daily Values</label>
<input type="text" id="textDailyValues" name="textDailyValues" value="Daily Value" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textServingSize">Serving Size</label>
<input type="text" id="textServingSize" name="textServingSize" value="Serving Size" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textServingsPerContainer">Servings Per Container</label><div class="h5"></div>
<input type="text" id="textServingsPerContainer" name="textServingsPerContainer" value="Servings Per Container" class="nutriMiscValue4 w180"><div class="h10"></div>
</div>
<div>
<label for="textAmountPerServing">Amount Per Serving</label><div class="h5"></div>
<input type="text" id="textAmountPerServing" name="textAmountPerServing" value="Amount Per Serving" class="nutriMiscValue4"><div class="h10"></div>
</div>
<div>
<label for="textCalories">Calories</label>
<input type="text" id="textCalories" name="textCalories" value="Calories" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textFatCalories">Fat Calories</label>
<input type="text" id="textFatCalories" name="textFatCalories" value="Calories from Fat" class="nutriMiscValue4 w120"><div class="h10"></div>
</div>
<div>
<label for="textTotalFat">Total Fat</label>
<input type="text" id="textTotalFat" name="textTotalFat" value="Total Fat" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textSatFat">Sat Fat</label>
<input type="text" id="textSatFat" name="textSatFat" value="Saturated Fat" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textTransFat">Trans Fat</label>
<input type="text" id="textTransFat" name="textTransFat" value="<i>Trans</i> Fat" class="nutriMiscValue4 w120"><div class="h10"></div>
</div>
<div>
<label for="textPolyFat">Poly Fat</label>
<input type="text" id="textPolyFat" name="textPolyFat" value="Polyunsaturated Fat" class="nutriMiscValue4"><div class="h10"></div>
</div>
<div>
<label for="textMonoFat">Mono Fat</label>
<input type="text" id="textMonoFat" name="textMonoFat" value="Monounsaturated Fat" class="nutriMiscValue4"><div class="h10"></div>
</div>
<div>
<label for="textCholesterol">Cholesterol</label>
<input type="text" id="textCholesterol" name="textCholesterol" value="Cholesterol" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textSodium">Sodium</label>
<input type="text" id="textSodium" name="textSodium" value="Sodium" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textTotalCarb">Total Carb</label>
<input type="text" id="textTotalCarb" name="textTotalCarb" value="Total Carbohydrates" class="nutriMiscValue4"><div class="h10"></div>
</div>
<div>
<label for="textFibers">Fibers</label>
<input type="text" id="textFibers" name="textFibers" value="Dietary Fiber" class="nutriMiscValue4 w120"><div class="h10"></div>
</div>
<div>
<label for="textSugars">Sugars</label>
<input type="text" id="textSugars" name="textSugars" value="Sugars" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textProteins">Proteins</label>
<input type="text" id="textProteins" name="textProteins" value="Protein" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textVitaminA">Vitamin A</label>
<input type="text" id="textVitaminA" name="textVitaminA" value="Vitamin A" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textVitaminC">Vitamin C</label>
<input type="text" id="textVitaminC" name="textVitaminC" value="Vitamin C" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textCalcium">Calcium</label>
<input type="text" id="textCalcium" name="textCalcium" value="Calcium" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="textIron">Iron</label>
<input type="text" id="textIron" name="textIron" value="Iron" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
<div>
<label for="ingredientLabel">Ingredient Label</label>
<input type="text" id="ingredientLabel" name="ingredientLabel" value="INGREDIENTS:" class="nutriMiscValue4 w120"><div class="h10"></div>
</div>
<div>
<label for="ingredientList">Ingredient List</label><div class="h5"></div>
<input type="text" id="ingredientList" name="ingredientList" value="None" class="nutriMiscValue4 w220"><div class="h10"></div>
</div>
<div>
<label for="textPercentDailyPart1">Percent Daily Part 1</label><div class="h5"></div>
<input type="text" id="textPercentDailyPart1" name="textPercentDailyPart1" value="Percent Daily Values are based on a" class="nutriMiscValue4 w220"><div class="h10"></div>
</div>
<div>
<label for="textPercentDailyPart2">Percent Daily Part 2</label>
<input type="text" id="textPercentDailyPart2" name="textPercentDailyPart2" value="calorie diet" class="nutriMiscValue4 w100"><div class="h10"></div>
</div>
</div>
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<!-- ------------------------------------------------------------------------------------------------------------------ -->
<div id="generatedLabel">
<a href="Generated the Label" id="generate">
<b class="note f20">Generated the Label</b>
</a>
<div id="label"></div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript" src="../nutritionLabel-min.js"></script>
<script type="text/javascript">
//check if the value is a positive number
function regIsPosNumber(fData){
var reg = new RegExp('(^[0-9]+[\.]?[0-9]+$)|(^[0-9]+$)');
return reg.test(fData);
}
$(document).ready(function(){
$("#generate").click(function(e){
e.preventDefault();
$('div#generatedLabel div#label').html('');
$('div#generatedLabel div#label').nutritionLabel({
showServingUnitQuantityTextbox : false,
allowCustomWidth : $('#allowCustomWidth_yes').prop('checked') ? 1 : 0,
allowNoBorder : $('#allowNoBorder_yes').prop('checked') ? 1 : 0,
allowFDARounding : $('#allowFDARounding_yes').prop('checked') ? 1 : 0,
scrollLongIngredients : $('#scrollLongIngredients_yes').prop('checked') ? 1 : 0,
showBottomLink : $('#showBottomLink_yes').prop('checked') ? 1 : 0,
showAmountPerServing : $('#showAmountPerServing_yes').prop('checked') ? 1 : 0,
showServingsPerContainer : $('#showServingsPerContainer_yes').prop('checked') ? 1 : 0,
showItemName : $('#showItemName_yes').prop('checked') ? 1 : 0,
showItemNameAtTheTop : $('#showItemNameAtTheTop_yes').prop('checked') ? 1 : 0,
showBrandName : $('#showBrandName_yes').prop('checked') ? 1 : 0,
showIngredients : $('#showIngredients_yes').prop('checked') ? 1 : 0,
showCalorieDiet : $('#showCalorieDiet_yes').prop('checked') ? 1 : 0,
showServingUnitQuantity : $('#showServingUnitQuantity_yes').prop('checked') ? 1 : 0,
showCalories : $('#showCalories_yes').prop('checked') ? 1 : 0,
showFatCalories : $('#showFatCalories_yes').prop('checked') ? 1 : 0,
showTotalFat : $('#showTotalFat_yes').prop('checked') ? 1 : 0,
showSatFat : $('#showSatFat_yes').prop('checked') ? 1 : 0,
showTransFat : $('#showTransFat_yes').prop('checked') ? 1 : 0,
showPolyFat : $('#showPolyFat_yes').prop('checked') ? 1 : 0,
showMonoFat : $('#showMonoFat_yes').prop('checked') ? 1 : 0,
showCholesterol : $('#showCholesterol_yes').prop('checked') ? 1 : 0,
showSodium : $('#showSodium_yes').prop('checked') ? 1 : 0,
showTotalCarb : $('#showTotalCarb_yes').prop('checked') ? 1 : 0,
showFibers : $('#showFibers_yes').prop('checked') ? 1 : 0,
showSugars : $('#showSugars_yes').prop('checked') ? 1 : 0,
showProteins : $('#showProteins_yes').prop('checked') ? 1 : 0,
showVitaminA : $('#showVitaminA_yes').prop('checked') ? 1 : 0,
showVitaminC : $('#showVitaminC_yes').prop('checked') ? 1 : 0,
showCalcium : $('#showCalcium_yes').prop('checked') ? 1 : 0,
showIron : $('#showIron_yes').prop('checked') ? 1 : 0,
naServingUnitQuantity : $('#naServingUnitQuantity_yes').prop('checked') ? 1 : 0,
naCalories : $('#naCalories_yes').prop('checked') ? 1 : 0,
naFatCalories : $('#naFatCalories_yes').prop('checked') ? 1 : 0,
naTotalFat : $('#naTotalFat_yes').prop('checked') ? 1 : 0,
naSatFat : $('#naSatFat_yes').prop('checked') ? 1 : 0,
naTransFat : $('#naTransFat_yes').prop('checked') ? 1 : 0,
naPolyFat : $('#naPolyFat_yes').prop('checked') ? 1 : 0,
naMonoFat : $('#naMonoFat_yes').prop('checked') ? 1 : 0,
naCholesterol : $('#naCholesterol_yes').prop('checked') ? 1 : 0,
naSodium : $('#naSodium_yes').prop('checked') ? 1 : 0,
naTotalCarb : $('#naTotalCarb_yes').prop('checked') ? 1 : 0,
naFibers : $('#naFibers_yes').prop('checked') ? 1 : 0,
naSugars : $('#naSugars_yes').prop('checked') ? 1 : 0,
naProteins : $('#naProteins_yes').prop('checked') ? 1 : 0,
naVitaminA : $('#naVitaminA_yes').prop('checked') ? 1 : 0,
naVitaminC : $('#naVitaminC_yes').prop('checked') ? 1 : 0,
naCalcium : $('#naCalcium_yes').prop('checked') ? 1 : 0,
naIron : $('#naIron_yes').prop('checked') ? 1 : 0,
width : regIsPosNumber( $('#width').val() ) ? parseInt( $('#width').val() ) : 260,
widthCustom : $('#widthCustom').val(),
itemName : $('#itemName').val(),
brandName : $('#brandName').val(),
scrollHeightComparison : regIsPosNumber( $('#scrollHeightComparison').val() ) ? parseInt( $('#scrollHeightComparison').val() ) : 100,
scrollHeightPixel : regIsPosNumber( $('#scrollHeightPixel').val() ) ? parseInt( $('#scrollHeightPixel').val() ) : 95,
decimalPlacesForNutrition : regIsPosNumber( $('#decimalPlacesForNutrition').val() ) ? parseInt( $('#decimalPlacesForNutrition').val() ) : 1,
decimalPlacesForDailyValues : regIsPosNumber( $('#decimalPlacesForDailyValues').val() ) ? parseInt( $('#decimalPlacesForDailyValues').val() ) : 0,
urlBottomLink : $('#urlBottomLink').val(),
nameBottomLink : $('#nameBottomLink').val(),
calorieIntake : regIsPosNumber( $('#calorieIntake').val() ) ? parseFloat( $('#calorieIntake').val() ) : 2000,
dailyValueTotalFat : regIsPosNumber( $('#dailyValueTotalFat').val() ) ? parseFloat( $('#dailyValueTotalFat').val() ) : 65,
dailyValueSatFat : regIsPosNumber( $('#dailyValueSatFat').val() ) ? parseFloat( $('#dailyValueSatFat').val() ) : 20,
dailyValueCholesterol : regIsPosNumber( $('#dailyValueCholesterol').val() ) ? parseFloat( $('#dailyValueCholesterol').val() ) : 300,
dailyValueSodium : regIsPosNumber( $('#dailyValueSodium').val() ) ? parseFloat( $('#dailyValueSodium').val() ) : 2400,
dailyValueCarb : regIsPosNumber( $('#dailyValueCarb').val() ) ? parseFloat( $('#dailyValueCarb').val() ) : 300,
dailyValueFiber : regIsPosNumber( $('#dailyValueFiber').val() ) ? parseFloat( $('#dailyValueFiber').val() ) : 25,
valueServingUnitQuantity : regIsPosNumber( $('#valueServingUnitQuantity').val() ) ? parseFloat( $('#valueServingUnitQuantity').val() ) : 0,
valueServingWeightGrams : regIsPosNumber( $('#valueServingWeightGrams').val() ) ? parseFloat( $('#valueServingWeightGrams').val() ) : 0,
valueServingSizeUnit : $('#valueServingSizeUnit').val(),
valueServingPerContainer : regIsPosNumber( $('#valueServingPerContainer').val() ) ? parseFloat( $('#valueServingPerContainer').val() ) : 1,
valueCalories : regIsPosNumber( $('#valueCalories').val() ) ? parseFloat( $('#valueCalories').val() ) : 0,
valueFatCalories : regIsPosNumber( $('#valueFatCalories').val() ) ? parseFloat( $('#valueFatCalories').val() ) : 0,
valueTotalFat : regIsPosNumber( $('#valueTotalFat').val() ) ? parseFloat( $('#valueTotalFat').val() ) : 0,
valueSatFat : regIsPosNumber( $('#valueSatFat').val() ) ? parseFloat( $('#valueSatFat').val() ) : 0,
valueTransFat : regIsPosNumber( $('#valueTransFat').val() ) ? parseFloat( $('#valueTransFat').val() ) : 0,
valuePolyFat : regIsPosNumber( $('#valuePolyFat').val() ) ? parseFloat( $('#valuePolyFat').val() ) : 0,
valueMonoFat : regIsPosNumber( $('#valueMonoFat').val() ) ? parseFloat( $('#valueMonoFat').val() ) : 0,
valueCholesterol : regIsPosNumber( $('#valueCholesterol').val() ) ? parseFloat( $('#valueCholesterol').val() ) : 0,
valueSodium : regIsPosNumber( $('#valueSodium').val() ) ? parseFloat( $('#valueSodium').val() ) : 0,
valueTotalCarb : regIsPosNumber( $('#valueTotalCarb').val() ) ? parseFloat( $('#valueTotalCarb').val() ) : 0,
valueFibers : regIsPosNumber( $('#valueFibers').val() ) ? parseFloat( $('#valueFibers').val() ) : 0,
valueSugars : regIsPosNumber( $('#valueSugars').val() ) ? parseFloat( $('#valueSugars').val() ) : 0,
valueProteins : regIsPosNumber( $('#valueProteins').val() ) ? parseFloat( $('#valueProteins').val() ) : 0,
valueVitaminA : regIsPosNumber( $('#valueVitaminA').val() ) ? parseFloat( $('#valueVitaminA').val() ) : 0,
valueVitaminC : regIsPosNumber( $('#valueVitaminC').val() ) ? parseFloat( $('#valueVitaminC').val() ) : 0,
valueCalcium : regIsPosNumber( $('#valueCalcium').val() ) ? parseFloat( $('#valueCalcium').val() ) : 0,
valueIron : regIsPosNumber( $('#valueIron').val() ) ? parseFloat( $('#valueIron').val() ) : 0,
unitCalories : $('#unitCalories').val(),
unitFatCalories : $('#unitFatCalories').val(),
unitTotalFat : $('#unitTotalFat').val(),
unitSatFat : $('#unitSatFat').val(),
unitTransFat : $('#unitTransFat').val(),
unitPolyFat : $('#unitPolyFat').val(),
unitMonoFat : $('#unitMonoFat').val(),
unitCholesterol : $('#unitCholesterol').val(),
unitSodium : $('#unitSodium').val(),
unitTotalCarb : $('#unitTotalCarb').val(),
unitFibers : $('#unitFibers').val(),
unitSugars : $('#unitSugars').val(),
unitProteins : $('#unitProteins').val(),
unitVitaminA : $('#unitVitaminA').val(),
unitVitaminC : $('#unitVitaminC').val(),
unitCalcium : $('#unitCalcium').val(),
unitIron : $('#unitIron').val(),
valueCol1CalorieDiet : regIsPosNumber( $('#valueCol1CalorieDiet').val() ) ? parseFloat( $('#valueCol1CalorieDiet').val() ) : 2000,
valueCol2CalorieDiet : regIsPosNumber( $('#valueCol2CalorieDiet').val() ) ? parseFloat( $('#valueCol2CalorieDiet').val() ) : 2500,
valueCol1DietaryTotalFat : regIsPosNumber( $('#valueCol1DietaryTotalFat').val() ) ? parseFloat( $('#valueCol1DietaryTotalFat').val() ) : 0,
valueCol2DietaryTotalFat : regIsPosNumber( $('#valueCol2DietaryTotalFat').val() ) ? parseFloat( $('#valueCol2DietaryTotalFat').val() ) : 0,
valueCol1DietarySatFat : regIsPosNumber( $('#valueCol1DietarySatFat').val() ) ? parseFloat( $('#valueCol1DietarySatFat').val() ) : 0,
valueCol2DietarySatFat : regIsPosNumber( $('#valueCol2DietarySatFat').val() ) ? parseFloat( $('#valueCol2DietarySatFat').val() ) : 0,
valueCol1DietaryCholesterol : regIsPosNumber( $('#valueCol1DietaryCholesterol').val() ) ? parseFloat( $('#valueCol1DietaryCholesterol').val() ) : 0,
valueCol2DietaryCholesterol : regIsPosNumber( $('#valueCol2DietaryCholesterol').val() ) ? parseFloat( $('#valueCol2DietaryCholesterol').val() ) : 0,
valueCol1DietarySodium : regIsPosNumber( $('#valueCol1DietarySodium').val() ) ? parseFloat( $('#valueCol1DietarySodium').val() ) : 0,
valueCol2DietarySodium : regIsPosNumber( $('#valueCol2DietarySodium').val() ) ? parseFloat( $('#valueCol2DietarySodium').val() ) : 0,
valueCol1DietaryTotalCarb : regIsPosNumber( $('#valueCol1DietaryTotalCarb').val() ) ? parseFloat( $('#valueCol1DietaryTotalCarb').val() ) : 0,
valueCol2DietaryTotalCarb : regIsPosNumber( $('#valueCol2DietaryTotalCarb').val() ) ? parseFloat( $('#valueCol2DietaryTotalCarb').val() ) : 0,
valueCol1Dietary : regIsPosNumber( $('#valueCol1Dietary').val() ) ? parseFloat( $('#valueCol1Dietary').val() ) : 0,
valueCol2Dietary : regIsPosNumber( $('#valueCol2Dietary').val() ) ? parseFloat( $('#valueCol2Dietary').val() ) : 0,
textNutritionFacts : $('#textNutritionFacts').val(),
textDailyValues : $('#textDailyValues').val(),
textServingSize : $('#textServingSize').val(),
textServingsPerContainer : $('#textServingsPerContainer').val(),
textAmountPerServing : $('#textAmountPerServing').val(),
textCalories : $('#textCalories').val(),
textFatCalories : $('#textFatCalories').val(),
textTotalFat : $('#textTotalFat').val(),
textSatFat : $('#textSatFat').val(),
textTransFat : $('#textTransFat').val(),
textPolyFat : $('#textPolyFat').val(),
textMonoFat : $('#textMonoFat').val(),
textCholesterol : $('#textCholesterol').val(),
textSodium : $('#textSodium').val(),
textTo