UNPKG

nutrition-label-jquery-plugin

Version:

To be able to create a FDA-style nutrition label with any nutrition data source

56 lines (49 loc) 1.46 kB
<!DOCTYPE html> <html lang="en"> <head> <title>Legacy Version Demo Page</title> <link rel='stylesheet' type='text/css' media='all' href='../../nutritionLabel-min.css'> <!-- google webfont for nutrition label --> <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Archivo+Black" /> </head> <body> <div id="test1"></div> <pre id="pre1" style="border: 1px solid black; width: 370px; padding: 15px;"> $('#test1').nutritionLabel({ width : 300, 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, valuePotassium : 210, valueTotalCarb : 3, valueFibers : 0, valueSugars : 3, valueProteins : 3, valueVitaminA : 1.22, valueVitaminC : 4.22, valueCalcium : 7.22, valueIron : 11.22 }); </pre> <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"> $(document).ready(function(){ eval( eval( $('#pre1').html() ) ); }); </script> </body> </html>