Most basic use of the plugin
$('#test1').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt' });
Giving specific nutrition label values and hiding some of the parts of the nutrition label
$('#test2').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', showServingUnitQuantity : false, itemName : 'Bleu Cheese Dressing', ingredientList : 'Bleu Cheese Dressing', decimalPlacesForQuantityTextbox : 2, valueServingUnitQuantity : 1, allowFDARounding : true, decimalPlacesForNutrition : 2, valueCalories : 450, valueTotalFat : 48, valueSatFat : 6, valueSodium : 780, valueTotalCarb : 3, valueFibers : 0, valueSugars : 3, valueProteins : 3 });
Similar to example #2 but with different plugin options. One thing to note is the use of serving size and serving size unit to overwrite the default value (compare it to other examples to see the difference)
$('#test3').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', showItemName : false, ingredientList : 'Enriched Bleached Wheat Flour (Bleached Flour, Malted Barley Flour, Niacin, Iron, Thiamin Mononitrate, Riboflavin, Folic Acid), Sugar, Vegetable Oil (contains one or more of the following oils: Cottonseed Oil, Palm Oil, Soybean Oil), Water, Hydrogenated Vegetable Oil (Palm Kernel Oil, Palm Oil), High Fructose Corn Syrup, Cocoa Powder (Processed With Alkali), contains 2% or less of the following: Eggs, Nonfat Milk, Glycerin, Soy Flour, Corn Syrup Solids, Leavening (Sodium Acid Pyrophosphate, Baking Soda, Sodium Aluminum Phosphate), Preservatives (Potassium Sorbate, Sodium Propionate, Calcium Propionate), Salt, Distilled Monoglycerides, Dextrose, Food Starch-Modified (Corn and/or Wheat), Soy, Lecithin, Natural and Artificial Flavor, Mono- and Diglycerides, Spices, Tapioca Starch, Wheat Starch, Cellulose Gum, Guar Gum, Karaya Gum, colored with Extracts of Annatto and Turmeric, Artificial Color.', showFibers : false, valueServingUnitQuantity : 6, valueServingSizeUnit : 'DONUTS', valueCalories : 400, valueTotalFat : 24, valueSatFat : 15, valueCholesterol : 25, valueSodium : 430, valueTotalCarb : 44, valueSugars : 24, valueProteins : 4 });
Similar to example #3 but the very tall ingredient list has a scroll to prevent a very tall nutrition label. The scroll height is customized too
$('#test4').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', scrollHeightPixel : 200, scrollLongIngredients : true, showItemName : false, showServingsPerContainer : true, ingredientList : 'Enriched Bleached Wheat Flour (Bleached Flour, Malted Barley Flour, Niacin, Iron, Thiamin Mononitrate, Riboflavin, Folic Acid), Sugar, Vegetable Oil (contains one or more of the following oils: Cottonseed Oil, Palm Oil, Soybean Oil), Water, Hydrogenated Vegetable Oil (Palm Kernel Oil, Palm Oil), High Fructose Corn Syrup, Cocoa Powder (Processed With Alkali), contains 2% or less of the following: Eggs, Nonfat Milk, Glycerin, Soy Flour, Corn Syrup Solids, Leavening (Sodium Acid Pyrophosphate, Baking Soda, Sodium Aluminum Phosphate), Preservatives (Potassium Sorbate, Sodium Propionate, Calcium Propionate), Salt, Distilled Monoglycerides, Dextrose, Food Starch-Modified (Corn and/or Wheat), Soy, Lecithin, Natural and Artificial Flavor, Mono- and Diglycerides, Spices, Tapioca Starch, Wheat Starch, Cellulose Gum, Guar Gum, Karaya Gum, colored with Extracts of Annatto and Turmeric, Artificial Color.', showFibers : false, valueServingUnitQuantity : 6, valueServingSizeUnit : 'DONUTS', valueCalories : 400, valueTotalFat : 24, valueSatFat : 15, valueSodium : 430, valueTotalCarb : 44, valueSugars : 24, valueProteins : 4 });
Similar to example #2 but with only a few visible values
$('#test5').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', showServingUnitQuantity : false, ingredientList : 'Balsamic Vinaigrette, BBQ Hickory, Steak Tips', itemName : 'Fire Grilled Sirloin Tips', showCalories : false, showSatFat : false, showProteins : false, showSodium : false, valueCalories : 410, valueSatFat : 4.5, valueSodium : 1220, valueTotalCarb : 20, valueFibers : 0, valueSugars : 18, valueProteins : 48 });
Similar to example #2 but with different plugin options. Things to note are the use of 'not applicable' and text value instead of numerical value on sugar
$('#test6').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', showServingUnitQuantity : false, showIngredients : false, itemName : 'Olive Tapenade', valueCalories : 800, valueTotalFat : 66, valueSatFat : 7, valueSodium : 1560, valueTotalCarb : 46, valueFibers : 2, valueSugars : '<1g', valueProteins : 7 });
Example where a few of the values are not applicable
$('#test7').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', showServingUnitQuantity : false, showIngredients : false, itemName : 'Bar None Sliders Bison', naCalories : true, naSatFat : true, naFibers : true, naProteins : true, valueCalories : 1110, valueTotalFat : 58, valueSatFat : 25, valueSodium : 1750 });
All non-numeric values are automatically filtered and converted to numeric to prevent errors
$('#test8').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', valueServingUnitQuantity : '~12', valueCalories : '~100', valueTotalFat : '<1g', valueSatFat : 'N/A', valueSodium : '<5mg', valueTotalCarb : 'Negligible', valueFibers : '<1g', valueSugars : 'n/a', valueProteins : 'not applicable', });
all values are not applicable
$('#test9').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', naCalories : true, naTotalFat : true, naSatFat : true, naCholesterol : true, naSodium : true, naTotalCarb : true, naFibers : true, naSugars : true, naProteins : true });
Similar to example #2 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
$('#test10').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', 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', valueCalories : 450.10, valueTotalFat : 48, valueSatFat : 6.12, valueSodium : 780, valueTotalCarb : 3, valueFibers : 0, valueSugars : 3, valueProteins : 3 });
Similar to example #2 but the "recommended daily intake values" are halved
$('#test11').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', showServingUnitQuantity : false, showIngredients : false, itemName : 'Bleu Cheese Dressing', dailyValueTotalFat : 35, dailyValueSatFat : 10, dailyValueSodium : 1200, dailyValueCarb : 130, dailyValueFiber : 12, dailyValueSugar : 45, dailyValueEnergyKcal : 1000, dailyValueProtein : 25, dailyValueSalt : 3, valueCalories : 450, valueTotalFat : 48, valueSatFat : 6, valueSodium : 780, valueTotalCarb : 3, valueFibers : 0, valueSugars : 3, valueProteins : 3 });
Giving specific nutrition label values and hiding some of the parts of the nutrition label
$('#test12').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', showServingUnitQuantity : false, itemName : 'Bleu Cheese Dressing', ingredientList : 'Bleu Cheese Dressing', showCalories : false, showProteins : false, showSodium : false, valueCalories : 450, valueTotalFat : 48, valueSatFat : 6, valueSodium : 780, valueTotalCarb : 3, valueFibers : 0, valueSugars : 3, valueProteins : 3 });
Similar to Example #2 but the arrows are hidden
$('#test13').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', hideTextboxArrows : true, showServingUnitQuantity : false, itemName : 'Bleu Cheese Dressing', ingredientList : 'Bleu Cheese Dressing', valueCalories : 450, valueTotalFat : 48, valueSatFat : 6, valueSodium : 780, valueTotalCarb : 3, valueFibers : 0, valueSugars : 3, valueProteins : 3 });
Similar to Example #3 but the arrows are hidden
$('#test14').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', hideTextboxArrows : true, showItemName : false, showServingsPerContainer : true, ingredientList : 'Enriched Bleached Wheat Flour (Bleached Flour, Malted Barley Flour, Niacin, Iron, Thiamin Mononitrate, Riboflavin, Folic Acid), Sugar, Vegetable Oil (contains one or more of the following oils: Cottonseed Oil, Palm Oil, Soybean Oil), Water, Hydrogenated Vegetable Oil (Palm Kernel Oil, Palm Oil), High Fructose Corn Syrup, Cocoa Powder (Processed With Alkali), contains 2% or less of the following: Eggs, Nonfat Milk, Glycerin, Soy Flour, Corn Syrup Solids, Leavening (Sodium Acid Pyrophosphate, Baking Soda, Sodium Aluminum Phosphate), Preservatives (Potassium Sorbate, Sodium Propionate, Calcium Propionate), Salt, Distilled Monoglycerides, Dextrose, Food Starch-Modified (Corn and/or Wheat), Soy, Lecithin, Natural and Artificial Flavor, Mono- and Diglycerides, Spices, Tapioca Starch, Wheat Starch, Cellulose Gum, Guar Gum, Karaya Gum, colored with Extracts of Annatto and Turmeric, Artificial Color.', showFibers : false, valueServingPerContainer : 5, valueServingUnitQuantity : 2, valueServingSizeUnit : 'Cookies', valueCalories : 400, valueTotalFat : 24, valueSatFat : 15, valueSodium : 430, valueTotalCarb : 44, valueSugars : 24, valueProteins : 4 });
Similar to example #3 but the disclaimer is shown
there is no scroll because the disclaimer div height is not greater than 100px
$('#test15').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', showItemName : false, ingredientList : 'Enriched Bleached Wheat Flour (Bleached Flour, Malted Barley Flour, Niacin, Iron, Thiamin Mononitrate, Riboflavin, Folic Acid), Sugar, Vegetable Oil (contains one or more of the following oils: Cottonseed Oil, Palm Oil, Soybean Oil), Water, Hydrogenated Vegetable Oil (Palm Kernel Oil, Palm Oil), High Fructose Corn Syrup, Cocoa Powder (Processed With Alkali), contains 2% or less of the following: Eggs, Nonfat Milk, Glycerin, Soy Flour, Corn Syrup Solids, Leavening (Sodium Acid Pyrophosphate, Baking Soda, Sodium Aluminum Phosphate), Preservatives (Potassium Sorbate, Sodium Propionate, Calcium Propionate), Salt, Distilled Monoglycerides, Dextrose, Food Starch-Modified (Corn and/or Wheat), Soy, Lecithin, Natural and Artificial Flavor, Mono- and Diglycerides, Spices, Tapioca Starch, Wheat Starch, Cellulose Gum, Guar Gum, Karaya Gum, colored with Extracts of Annatto and Turmeric, Artificial Color.', showDisclaimer : true, showFibers : false, valueServingUnitQuantity : 6, valueServingSizeUnit : 'DONUTS', valueCalories : 400, valueTotalFat : 24, valueSatFat : 15, valueSodium : 430, valueTotalCarb : 44, valueSugars : 24, valueProteins : 4 });
Similar to example #4 but the disclaimer is shown and customized
Another difference is that the scrollHeightPixel is the default value
$('#test16').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', scrollLongIngredients : true, showItemName : false, ingredientList : 'Enriched Bleached Wheat Flour (Bleached Flour, Malted Barley Flour, Niacin, Iron, Thiamin Mononitrate, Riboflavin, Folic Acid), Sugar, Vegetable Oil (contains one or more of the following oils: Cottonseed Oil, Palm Oil, Soybean Oil), Water, Hydrogenated Vegetable Oil (Palm Kernel Oil, Palm Oil), High Fructose Corn Syrup, Cocoa Powder (Processed With Alkali), contains 2% or less of the following: Eggs, Nonfat Milk, Glycerin, Soy Flour, Corn Syrup Solids, Leavening (Sodium Acid Pyrophosphate, Baking Soda, Sodium Aluminum Phosphate), Preservatives (Potassium Sorbate, Sodium Propionate, Calcium Propionate), Salt, Distilled Monoglycerides, Dextrose, Food Starch-Modified (Corn and/or Wheat), Soy, Lecithin, Natural and Artificial Flavor, Mono- and Diglycerides, Spices, Tapioca Starch, Wheat Starch, Cellulose Gum, Guar Gum, Karaya Gum, colored with Extracts of Annatto and Turmeric, Artificial Color.', showDisclaimer : true, valueDisclaimer : 'Although efforts are made to avoid cross-contact of allergens, Mellow Mushroom does not guarantee that cross-contact with allergens will not occur. Before placing your order, please inform your server if you or anyone in your party has a food allergy
Unless otherwise specified, any food in our establishment may come into contact with surfaces or utensils that have previously contacted wheat, dairy, gluten, fish, eggs, shellfish, soybeans, tree nuts, or peanuts.
This nutrition and allergen information is provided for information purposes only, and they do not constitute medical or dietary advice of any kind. Please always consult your healthcare practitioner for questions regarding your diet.
Mellow Mushroom, its franchisees, and employees, do not assume responsibility for a person’s sensitivity or allergy to any food item provided in our restaurants.
We rely on our suppliers’ statements of ingredients to determine which products do not contain certain allergens. Suppliers may change the ingredients in their products or the way they prepare their products, so please check this list frequently to make sure that the menu item you like still meets your dietary requirements.
From time to time we may substitute products due to inventory shortages. We can’t be sure that the substitute products will be free of the allergen you wish to avoid.
Please note that these nutrition values are estimated based on our standard serving portions. As food servings may have a slight variance each time you visit, please expect these values to be with in 10% +/- of your actual meal. If you have any questions about our nutrition calculator, please contact Nutritionix.', showFibers : false, valueServingUnitQuantity : 6, valueServingSizeUnit : 'DONUTS', valueCalories : 400, valueTotalFat : 24, valueSatFat : 15, valueSodium : 430, valueTotalCarb : 44, valueSugars : 24, valueProteins : 4 });
Similar to Example #2 but the Percent Daily Values are Hidden
$('#test17').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', hidePercentDailyValues : true, showServingUnitQuantity : false, itemName : 'Bleu Cheese Dressing', ingredientList : 'Bleu Cheese Dressing', decimalPlacesForQuantityTextbox : 2, valueServingUnitQuantity : 1, allowFDARounding : true, decimalPlacesForNutrition : 2, valueCalories : 450, valueTotalFat : 48, valueSatFat : 6, valueSodium : 780, valueTotalCarb : 3, valueFibers : 0, valueSugars : 3, valueProteins : 3 });
Similar to Example #2 but only specific Percent Daily Values are Hidden
$('#test18').nutritionLabel({ width : 380, showLegacyVersion : false, showUKVersion : true, showItemNameForUK : true, showDailySugars : true, valueServingWeightGrams : 77, dailyValueTotalFat : 70, //this should be 70 for the uk version dailyValueCarb : 260, //this should be 260 for the uk version dailyValueSugar : 90, //this should be 90 for the uk version textCalories : 'Energy', textTotalCarb : 'Carbohydrate', textFibers : 'Fibre', textSodium : 'Salt', showDailyEnergy : false, showDailyTotalFat : false, showDailySodium : false, showServingUnitQuantity : false, itemName : 'Bleu Cheese Dressing', ingredientList : 'Bleu Cheese Dressing', decimalPlacesForQuantityTextbox : 2, valueServingUnitQuantity : 1, allowFDARounding : true, decimalPlacesForNutrition : 2, valueCalories : 450, valueFatCalories : 430, valueTotalFat : 48, valueSatFat : 6, valueSodium : 780, valueTotalCarb : 3, valueFibers : 0, valueSugars : 3, valueProteins : 3 });