Example #1

Giving specific nutrition label values and hiding some of the parts of the nutrition label

$('#test1').nutritionLabel({
	useBaseValueFor2018LabelAndNotDVPercentage : true,
	showServingUnitQuantity : false,
	itemName : 'Bleu Cheese Dressing',
	ingredientList : 'Bleu Cheese Dressing',

	decimalPlacesForQuantityTextbox : 2,
	valueServingUnitQuantity : 1,

	allowFDARounding : true,
	decimalPlacesForNutrition : 2,

	showPolyFat : false,
	showMonoFat : false,

	valueCalories : 450,
	valueFatCalories : 430,
	valueTotalFat : 48,
	valueSatFat : 6,
	valueTransFat : 0,
	valueCholesterol : 30,
	valueSodium : 780,
	valueTotalCarb : 3,
	valueFibers : 0,
	valueSugars : 3,
	valueProteins : 3,
	valueVitaminD : 12.22,
	valuePotassium_2018 : 4.22,
	valueCalcium : 7.22,
	valueIron : 11.22,
	valueAddedSugars : 17,
	valueCaffeine : 15.63,
	showLegacyVersion : false
});



Example #2

Similar to example #1 but with different plugin options. Things to note are the use of 'not applicable' and text value instead of numerical value on sugar

$('#test2').nutritionLabel({
	useBaseValueFor2018LabelAndNotDVPercentage : true,
	showServingUnitQuantity : false,
	showAmountPerServing : false,
	showIngredients : false,
	itemName : 'Olive Tapenade',

	naFatCalories : true,
	naPolyFat : true,
	naMonoFat : true,
	naVitaminD : true,
	naPotassium : true,
	naCalcium : true,
	naIron : true,

	valueCalories : 800,
	valueTotalFat : 66,
	valueSatFat : 7,
	valueTransFat : 0,
	valueCholesterol : 0,
	valueSodium : 1560,
	valueTotalCarb : 46,
	valueFibers : 2,
	valueSugars : '<1g',
	valueProteins : 7,
	valueVitaminD : 12.22,
	valuePotassium_2018 : 4.22,
	valueCalcium : 7.22,
	valueIron : 11.22,
	valueAddedSugars : 17,
	valueCaffeine : 15.63,
	showLegacyVersion : false
});



Example #3

all values are not applicable

$('#test3').nutritionLabel({
	useBaseValueFor2018LabelAndNotDVPercentage : true,
	naCalories : true,
	naFatCalories : true,
	naTotalFat : true,
	naSatFat : true,
	naTransFat : true,
	naPolyFat : true,
	naMonoFat : true,
	naCholesterol : true,
	naSodium : true,
	naTotalCarb : true,
	naFibers : true,
	naSugars : true,
	naProteins : true,
	naVitaminD : true,
	naPotassium : true,
	naCalcium : true,
	naIron : true,
	naAddedSugars : true,
	naPotassium_2018 : true,
	naCaffeine : true,
	showLegacyVersion : false
});



Example #4

Similar to example #1 but with a few different settings - different calorie intake, decimal places for nutrition changed from 1 to 2, decimal places for the "% daily values" is changed from 0 to 2, showing the home page link at the bottom and customizing it

$('#test4').nutritionLabel({
	useBaseValueFor2018LabelAndNotDVPercentage : true,
	calorieIntake : 1222,
	showServingUnitQuantity : false,
	showIngredients : false,
	itemName : 'Bleu Cheese Dressing',
	decimalPlacesForNutrition : 2,
	decimalPlacesForDailyValues : 2,

	showBottomLink : true,
	urlBottomLink : 'http://facebook.com',
	nameBottomLink : 'Google Name but the URL is facebook\'s',

	showPolyFat : false,
	showMonoFat : false,

	valueCalories : 450.10,
	valueFatCalories : 430.23,
	valueTotalFat : 48,
	valueSatFat : 6.12,
	valueTransFat : 0.00,
	valueCholesterol : 30.90,
	valueSodium : 780,
	valueTotalCarb : 3,
	valueFibers : 0,
	valueSugars : 3,
	valueProteins : 3,
	valueVitaminD : 12.22,
	valuePotassium_2018 : 4.22,
	valueCalcium : 7.22,
	valueIron : 11.22,
	valueAddedSugars : 17,
	valueCaffeine : 15.63,
	showLegacyVersion : false
});



Example #5

Similar to example #1 but the "recommended daily intake values" are halved

$('#test5').nutritionLabel({
	useBaseValueFor2018LabelAndNotDVPercentage : true,
	showServingUnitQuantity : false,
	showIngredients : false,
	itemName : 'Bleu Cheese Dressing',

	dailyValueTotalFat : 32,
	dailyValueSatFat : 10,
	dailyValueCholesterol : 150,
	dailyValueSodium : 1200,
	dailyValueCarb : 150,
	dailyValueFiber : 12,

	showPolyFat : false,
	showMonoFat : false,

	valueCalories : 450,
	valueFatCalories : 430,
	valueTotalFat : 48,
	valueSatFat : 6,
	valueTransFat : 0,
	valueCholesterol : 30,
	valueSodium : 780,
	valueTotalCarb : 3,
	valueFibers : 0,
	valueSugars : 3,
	valueProteins : 3,
	valueVitaminD : 12.22,
	valuePotassium_2018 : 4.22,
	valueCalcium : 7.22,
	valueIron : 11.22,
	valueAddedSugars : 17,
	valueCaffeine : 15.63,
	showLegacyVersion : false
});

Example #6

Similar to Example #1 but the Percent Daily Values are Hidden

$('#test6').nutritionLabel({
	useBaseValueFor2018LabelAndNotDVPercentage : true,
	hidePercentDailyValues : true,
	showServingUnitQuantity : false,
	itemName : 'Bleu Cheese Dressing',
	ingredientList : 'Bleu Cheese Dressing',

	decimalPlacesForQuantityTextbox : 2,
	valueServingUnitQuantity : 1,

	allowFDARounding : true,
	decimalPlacesForNutrition : 2,

	showPolyFat : false,
	showMonoFat : false,

	valueCalories : 450,
	valueFatCalories : 430,
	valueTotalFat : 48,
	valueSatFat : 6,
	valueTransFat : 0,
	valueCholesterol : 30,
	valueSodium : 780,
	valueTotalCarb : 3,
	valueFibers : 0,
	valueSugars : 3,
	valueProteins : 3,
	valueVitaminD : 12.22,
	valuePotassium_2018 : 4.22,
	valueCalcium : 7.22,
	valueIron : 11.22,
	valueAddedSugars : 17,
	valueCaffeine : 15.63,
	showLegacyVersion : false
});



Example #7

Similar to Example #1 but only specific Percent Daily Values are Hidden

$('#test7').nutritionLabel({
	useBaseValueFor2018LabelAndNotDVPercentage : true,
	showDailyTotalFat : false,
	showDailySodium : false,
	showDailyFibers : false,
	showDailyAddedSugars : false,
	showDailyCalcium : false,
	showDailyIron : false,

	showServingUnitQuantity : false,
	itemName : 'Bleu Cheese Dressing',
	ingredientList : 'Bleu Cheese Dressing',

	decimalPlacesForQuantityTextbox : 2,
	valueServingUnitQuantity : 1,

	allowFDARounding : true,
	decimalPlacesForNutrition : 2,

	showPolyFat : false,
	showMonoFat : false,

	valueCalories : 450,
	valueFatCalories : 430,
	valueTotalFat : 48,
	valueSatFat : 6,
	valueTransFat : 0,
	valueCholesterol : 30,
	valueSodium : 780,
	valueTotalCarb : 3,
	valueFibers : 0,
	valueSugars : 3,
	valueProteins : 3,
	valueVitaminD : 12.22,
	valuePotassium_2018 : 4.22,
	valueCalcium : 7.22,
	valueIron : 11.22,
	valueAddedSugars : 17,
	valueCaffeine : 15.63,
	showLegacyVersion : false
});