This post contains affiliate links for products I genuinely recommend, which means I earn a small commission at no cost to you.
This easy lemon dill hummus is smooth, creamy, and perfect for snacking! It’s made with simple ingredients: chickpeas, olive oil, tahini, garlic, lemon, salt, pepper, and fresh dill. This hummus recipe was updated in May 2022 with a new photos and tips for making your hummus super smooth!

Friends, get your pita chips, crackers, and veggies ready, because this easy lemon dill hummus is smooth, creamy, and made for hardcore snacking! Spring is a time for fresh herbs and bright flavors, so we’re coming in hot with bright lemon and fresh dill.
[feast_advanced_jump_to]
Ingredients
For this hummus we’ll need all the usual hummus suspects, plus our flavor of the day: lemon and dill.

- Canned chickpeas – I love using canned as a time saver (instead of dried). Typically when our hummus craving hits, it hits hard, and soaking dried beans becomes a ‘next time’ thing.
- Baking soda – The secret for super smooth hummus! Boiling canned chickpeas with baking soda helps get the skins off the chickpeas easily, plus it makes them somewhat mushy, which makes super creamy hummus.
- Tahini – The key ingredient in hummus for its signature flavor and smooth, creamy texture.
- Olive oil – Another key ingredient in hummus for rich, delicious flavor.
- Garlic – A hummus essential!
- Lemon – We typically put lemon in hummus either way, but we’ll use the juice of one whole lemon for this batch!
- Fresh dill – One of my favorite fresh herbs of spring.
- Salt – To enhance the overall flavor of the hummus.
- Pepper – For added flavor.
- Ice water – Blending this in to the hummus at the end makes the hummus SUPER smooth and fluffy!
Instructions
Below are the steps for making this easy lemon dill hummus, plus some steps included to help make your hummus as smooth as possible.

Place garlic and lemon juice in the base of your food processor. As the garlic sits in the acidic lemon, it will take the edge off of its spicy bite.

While the garlic macerates in lemon juice, add chickpeas to a pot with water and baking soda. Boil the chickpeas for 12 minutes. You will start to see the chickpea skins float to the top; feel free to skim those off the surface as the chickpeas boil.

Drain the cooked chickpeas, and remove any skins that are easy to pick out. No need to be perfect!

Once the chickpeas have cooled a bit, add them to your food processor along with all other ingredients, except for the ice water.

Blend for at least one minute, until smooth.

Pour the ice water into the feed tube (if your food processor has one; otherwise just pour it in), and allow the food processor to run for another minute while the ice water drips in.
Finally, give it a taste test and add more salt or spices as needed. Serve with freshly cracked pepper, fresh dill, and olive oil drizzled on top!

Hint: To serve this hummus in a beautiful way, set aside a few chickpeas before you boil the rest. At the end, run the back of a spoon across the hummus in its serving bowl to create some ridges, and create a small divot in the center. Add the chickpeas to the divot and drizzle olive oil over the top so that it creeps into all the crevices you created on the surface. This olive oil will protect the surface (keep it moist and fresh), plus it looks beautiful!
Variations
Once you have a basic hummus recipe down, there are ingredient variations you can use to intensify or modify the flavors.
- Herbs – Trade fresh dill for fresh parsley, basil, or your favorite herb.
- Olive oil – Try an infused olive oil for extra flavor.
- Garlic – Roast your garlic or use garlic confit for a delicious garlic flavor without the bite of raw garlic. I shared how we mitigate this above, but roasted and confit garlic are alternative options that will add TONS of flavor!
- Tahini sauce – Double down on tahini?? Yes, please. Drizzle tahini sauce over the top of your hummus before serving. It’ll sit on top of the hummus and flow until all the crevices, and add a rich and creamy flavor. It’s SO good!
- Spicy – Spice up your hummus by adding a tablespoon of chili paste or teaspoon of chili pepper flakes to your hummus before blending.

Storage
Store fresh hummus in an airtight container in the fridge for up to 8 days. To best preserve hummus in the fridge, I recommend drizzling a thin layer of olive oil over the top before sealing the container.
Lemon Dill Hummus FAQs
Technically, you can freeze hummus and thaw when you’re ready to use it. But, the longer the hummus is frozen, the more the texture changes. I recommend enjoying homemade hummus while it’s fresh!
Hummus is best served with some good quality olive oil drizzled on top, alongside any of your favorite pits chips, crackers, and raw or roasted veggies! You can also serve it with eggs, on toast, or as a sandwich/wrap spread.
Top tip
Before serving, allow the hummus to soften at room temperature for about 15-30 minutes. It’ll taste delicious either way, but room temperature homemade hummus is softer!
.tasty-recipes-print-button{background-color:#667;border:none;display:inline-block;padding:.5em 1em;text-decoration:none}body:not(.tasty-recipes-print-view) .tasty-recipes-print-button.tasty-recipes-print-above-card{color:#fff;display:none}body:not(.tasty-recipes-print-view) .tasty-recipes-print-button.tasty-recipes-print-above-card:hover{background-color:#b2b2bb;color:#fff;display:inline-block;padding:.5em 1em;text-decoration:none}.tasty-recipes-image-button-container{display:flex;flex-direction:column;flex-wrap:wrap;float:right;margin-left:10px}body.tasty-recipes-print-view .tasty-recipes-buttons{display:none}.tasty-recipes-image-button-container .tasty-recipes-buttons{margin-bottom:10px;margin-top:10px}.tasty-recipes-image-button-container .tasty-recipes-button-wrap{box-sizing:border-box;margin-bottom:10px}.tasty-recipes-image-button-container .tasty-recipes-buttons a{background-color:#f9f9f9;border:1px solid #aaa;border-radius:0;color:#aaa;display:block;font-size:16px;font-weight:700;line-height:16px;margin-top:0;padding:8px;text-align:center;text-decoration:none;text-transform:uppercase}.tasty-recipes-image-button-container .tasty-recipes-buttons .button:hover{background-color:#aaa;border:1px solid #aaa;color:#fff;opacity:1}.tasty-recipes-image-button-container .tasty-recipes-buttons a:hover{background-color:#979599;text-decoration:none}.tasty-recipes-image-button-container .tasty-recipes-buttons svg{display:none}.tasty-recipes-yield-scale{border:1px solid #979599;border-radius:2px;color:#979599;font-size:.7rem;margin-left:3px;padding:0 4px}.tasty-recipes-units-scale-container{display:flex;flex-wrap:wrap}.tasty-recipes-convert-container{padding:0 1em 1em 0}.tasty-recipes-convert-container .tasty-recipes-convert-label{align-self:center;color:#979599;font-size:.6rem;text-transform:uppercase}.tasty-recipes-convert-container button{background:transparent;border:1px solid #353547;border-radius:2px;color:#353547;letter-spacing:0;margin-left:5px;min-width:34px;padding:2px 4px;text-align:center}.tasty-recipes-convert-container button.tasty-recipes-convert-button-active{background-color:#000;border-color:#000;color:#fff}.tasty-recipes-convert-container button:focus{outline:none}.tasty-recipes-scale-container{display:flex;padding:0 0 1em}.tasty-recipes-scale-container .tasty-recipes-scale-label{align-self:center;color:#979599;font-size:.6rem;text-transform:uppercase}.tasty-recipes-scale-container button{background:transparent;border:1px solid #353547;border-radius:2px;color:#353547;letter-spacing:0;margin-left:5px;min-width:34px;padding:2px 4px}.tasty-recipes-scale-container button.tasty-recipes-scale-button-active{background-color:#000;border-color:#000;color:#fff}.tasty-recipes-scale-container button:focus{outline:none}.tasty-recipes-ingredients-header{margin:1em 0}@media only screen and (min-width:520px){.tasty-recipes-ingredients-header{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between}}.tasty-recipes-ingredients-header .tasty-recipes-ingredients-clipboard-container{align-items:baseline;display:inline-flex}.tasty-recipes-ingredients-header h3{margin:0 10px 10px 0}.tasty-recipes-ingredients-clipboard-container .tasty-recipes-copy-button{background:transparent;border:none;color:#353547;height:24px;padding:0;position:relative;width:24px}.tasty-recipes-ingredients-clipboard-container .tasty-recipes-copy-button:hover{opacity:.5}.tasty-recipes-instructions-header{align-items:baseline;display:flex;flex-wrap:wrap;justify-content:space-between;margin:1em 0}.tasty-recipes-entry-content .tasty-recipes-instructions h3{margin:0 0 1rem}@media only screen and (min-width:520px){.tasty-recipes-entry-content .tasty-recipes-instructions h3{margin:0}}button[name=tasty-recipes-video-toggle]{background:#979599;border:#979599;border-radius:2px;display:inline-block;font-size:14px;height:30px;line-height:20px;margin:0;padding:0;text-align:center;vertical-align:middle;width:86px}button[name=tasty-recipes-video-toggle] span{padding:0 4px;pointer-events:none}button[name=tasty-recipes-video-toggle][aria-checked=false] :last-child,button[name=tasty-recipes-video-toggle][aria-checked=true] :first-child{background:#fff;border-radius:2px;color:#979599;padding:2px 4px}button[name=tasty-recipes-video-toggle][aria-checked=false] :first-child,button[name=tasty-recipes-video-toggle][aria-checked=true] :last-child{color:#fff}label[for=tasty-recipes-video-toggle]{color:#979599;font-size:.6rem;line-height:30px;padding-right:8px;text-transform:uppercase;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;-o-user-select:none;vertical-align:middle}.tasty-recipe-responsive-iframe-container{margin:10px 0}.tasty-recipes-equipment{display:flex;flex-wrap:wrap;justify-content:space-evenly}.tasty-recipes-equipment>h3{flex:0 0 100%}.tasty-recipes-equipment .tasty-link-card{flex:0 0 50%;padding:1.5rem 1rem;text-align:center}@media screen and (min-width:500px){.tasty-recipes-equipment .tasty-link-card{flex:0 0 33%}}.tasty-recipes-equipment .tasty-link-card p{font-size:1em;font-weight:700;margin-bottom:0}.tasty-recipes-equipment .tasty-link-card p a{color:initial}.tasty-recipes-equipment .tasty-link-card span{font-size:.9em}.tasty-recipes .tasty-recipes-nutrition ul{list-style-type:none;margin:0;padding:0}.tasty-recipes .tasty-recipes-nutrition ul:after{clear:both;content:” “;display:block}.tasty-recipes .tasty-recipes-nutrition li{float:left;list-style-type:none;margin-bottom:0;margin-left:0;margin-right:16px}.tasty-recipes-plug{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;margin-bottom:1em;text-align:center}.tasty-recipes-plug a{box-shadow:none;text-decoration:none}.tasty-recipes-plug a img{display:inline-block;height:auto;margin:5px 0 0 8px;width:150px}.tasty-recipes-footer-content{padding:1.5em;text-align:center}.tasty-recipes-footer-content .tasty-recipes-footer-copy{margin-left:0}.tasty-recipes-footer-content img,.tasty-recipes-footer-content svg{width:60px}.tasty-recipes-entry-content .tasty-recipes-entry-footer h3{font-size:1.25em;margin:0 0 .25em;padding:0}.tasty-recipes-entry-footer p{font-size:.75em;margin:0}.tasty-recipes-entry-footer p a{border-bottom:none;box-shadow:none;text-decoration:underline}.tasty-recipes-flash-message{background-color:#fff;border-radius:4px;box-shadow:0 .3px .4px 0 rgba(0,0,0,.024),0 .9px 1.5px 0 rgba(0,0,0,.05),0 3.5px 6px 0 rgba(0,0,0,.1);color:#313135;display:inline-block;font-size:13px;letter-spacing:0;line-height:1.2em;margin-left:10px;padding:4px 10px}@media screen and (min-width:500px){.tasty-recipes-flash-message{padding:4px 10px}}.tasty-recipes-flash-message p{margin:0;padding:0;text-transform:none}@media screen and (min-width:500px){.tasty-recipes-footer-content{align-items:center;display:flex;justify-content:center;padding:1.5em 0;text-align:left}.tasty-recipes-footer-content .tasty-recipes-footer-copy{margin-left:.8em}}@media print{.tasty-recipes-no-print,.tasty-recipes-no-print *{display:none!important}}[data-tr-ingredient-checkbox]{cursor:pointer;list-style-position:outside;list-style-type:none!important;margin-left:0!important}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container{position:relative}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]+label{display:inline-block;position:relative;vertical-align:middle}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]{clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;position:absolute!important;width:1px}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]+label:before{border:1px solid;border-radius:2px;content:””;display:inline-block;height:20px;margin-right:10px;position:relative;width:20px}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]:checked+label:after{border-bottom:2px solid;border-left:2px solid;content:””;display:inline-block;height:6px;left:4px;position:absolute;top:4px;transform:rotate(-45deg);width:12px}[data-tr-ingredient-checkbox] .tr-ingredient-checkbox-container input[type=checkbox]:focus+label:before{box-shadow:0 0 8px #5e9ed6;outline:1px solid #5d9dd5}[data-tr-ingredient-checkbox=checked]{opacity:.8;text-decoration:line-through}/* Tasty Recipes Simple recipe card styles */ .tasty-recipes-display{border:0.15em solid #ededed;padding:1.5em;margin-bottom:1em}.tasty-recipes-plug{margin-bottom:1em}.tasty-recipes-display ul,.tasty-recipes-display ol{margin-left:0}.tasty-recipes-display h2{font-weight:400;text-transform:lowercase;padding-top:0;margin-top:0}.tasty-recipes-details{font-size:0.8em}.tasty-recipes-label{color:#797B7C}.tasty-recipes-details ul li{list-style-type:none;margin-left:0}.prep-time,.total-time,.cook-time{display:inline-block;width:20%;margin:0.8em 0;vertical-align:top}.tasty-recipes-rating a{text-decoration:none}.tasty-recipes-rating p{margin-bottom:1rem;display:inline-block}.tasty-recipes-rating .rating-label{font-style:italic;font-size:0.8em}.tasty-recipes-notes{margin-bottom:1rem}.tasty-recipes-nutrition{padding:0.5em;border-top:.15em solid #ededed}.tasty-recipes-nutrition ul li{list-style-type:none;font-size:0.8em;margin-left:0}@media only screen and (min-width:520px){.tasty-recipes-nutrition ul li{width:30%}}.tasty-recipe-ingredients h3,.tasty-recipes-ingredients h3,.tasty-recipe-instructions h3,.tasty-recipes-instructions h3,.tasty-recipes-equipment h3,.tasty-recipes-notes h3{font-weight:200;margin-top:0.6em;margin-bottom:1.2em;text-transform:lowercase}.tasty-recipe-ingredients h4,.tasty-recipes-ingredients h4,.tasty-recipe-instructions h4,.tasty-recipes-instructions h4{font-size:1.2em;font-weight:700;text-transform:lowercase;color:#797B7C}.tasty-recipes-description p{font-size:.8em;font-style:italic}.tasty-recipe-video-embed~.tasty-recipes-equipment{padding-top:1em}.tasty-recipes-nutrition h3{font-size:1em;text-align:center;margin-top:1em}.tasty-recipes-notes h3{font-size:1.2em}.tasty-recipes-notes p,.tasty-recipes-notes ul{font-size:0.8em}.tasty-recipes-keywords p{font-size:.8em;margin-top:1em;margin-bottom:1em}.tasty-recipes-entry-footer{text-align:center;padding-top:1rem}.tasty-recipes-source-link{text-align:center}/*Print styles*/ .tasty-recipes-print{font-size:11px;line-height:1.5em}.tasty-recipes-print .tasty-recipes-description p{font-size:1em;line-height:1.5em}.tasty-recipes-print ul,.tasty-recipes-print ol{padding-left:1.25em}.tasty-recipes-print .tasty-recipes-details ul{padding-left:0}.tasty-recipes-print-view h3{font-size:1.2em;letter-spacing:0.1em;margin:0 0 10px 0}.tasty-recipes-print-view .tasty-recipes-ingredients-header,.tasty-recipes-print-view .tasty-recipes-instructions-header{margin:0}.tasty-recipes-print-view .tasty-recipes-ingredients,.tasty-recipes-print-view .tasty-recipes-instructions{padding:1.25em 0}
Easy Lemon Dill Hummus
This easy lemon dill hummus is super smooth and creamy, flavored with lemon and fresh dill! Serve with pita chips, crackers, veggies, or use as a sandwich spread.
- Prep Time: 10
- Cook Time: 12
- Total Time: 22 minutes
- Yield: 1.5 cups
- Category: Appetizers, snacks
- Method: Food processor
- Cuisine: Mediterranean
Ingredients
Units
- 1–2 cloves fresh garlic, sliced
- juice of 1 lemon
- 1 can chickpeas, drained and rinsed
- ½ teaspoon baking soda
- ¼ cup tahini
- 2 tbsp olive oil, plus more for serving
- 3–4 tablespoon fresh dill
- salt and pepper, to taste
- ¼ cup ice water
Instructions
- Macerate garlic. Place sliced garlic in the base of a food processor with the lemon juice. Allow to sit in the lemon juice while you cook the chickpeas.
- Cook the chickpeas. Place the chickpeas and baking soda in a small pot and cover with water. Bring the water to a boil and reduce to a simmer, and allow the chickpeas to boil for 12 minutes. This will soften the chickpeas and encourage their skins to fall off naturally. While the chickpeas boil, you can skim the chickpea skins off the surface of the water.
- Drain chickpeas & discard skins. Once the chickpeas have boiled, they will look mushy — that’s okay! Drain the chickpeas and rinse them in cool water. If you see any skins, pick them out and discard. It doesn’t have to be perfect!
- Combine & blend. Combine all ingredients in a food processor or high-speed blender, and blend for a full minute. Add ice water through the food processor feed tube or directly into the blender. Then, blend again for one more full minute. Taste and add more salt if needed.
- Serve. Spoon the hummus onto a platter and use the back of a spoon to smooth and create some shallow crevices in the surface. Drizzle olive oil over the top and allow it to pool within the crevices – YUM! Sprinkle with more fresh dill and freshly cracked pepper.
Equipment
Food Processor
Buy Now →
Small Pot
Buy Now →
Notes
- Boiling the chickpeas. Because of the baking soda added to the boiling water, sometimes it can boil over. Just keep the chickpeas at a simmer and keep an eye on it, stirring occasionally, and this should keep it from boiling over.
- Store Instructions. Store hummus in an airtight container and drizzle a thin layer of olive oil over the top to keep the surface fresh. Enjoy within 8 days.
(function(){
window.addEventListener( ‘message’, function( event ){
if ( ( ‘https://nutrifox.com’ !== event.origin && ‘https://nutrifox.test’ !== event.origin ) ||
typeof event.data !== ‘string’ ) {
return;
}
var payload = JSON.parse( event.data );
switch ( payload.event ) {
case ‘setHeight’:
var iframe = document.getElementById( ‘nutrifox-label-‘ + payload.recipeId );
iframe.style.height = payload.height + ‘px’;
break;
}
} );
}())
Keywords: lemon dill hummus
(function(){
/* frac.js (C) 2012-present SheetJS — http://sheetjs.com */
/* bothEquals() avoids use of &&, which gets prettified by WordPress. */
var bothEquals = function( d1, d2, D ) {
var ret = 0;
if (d1<=D) {
ret++;
}
if (d2<=D) {
ret++;
}
return ret === 2;
};
var frac =function frac(x,D,mixed){var n1=Math.floor(x),d1=1;var n2=n1+1,d2=1;if(x!==n1)while(bothEquals(d1,d2,D)){var m=(n1+n2)/(d1+d2);if(x===m){if(d1+d2d2)d2=D+1;else d1=D+1;break}else if(xD){d1=d2;n1=n2}if(!mixed)return[0,n1,d1];var q=Math.floor(n1/d1);return[q,n1-q*d1,d1]};frac.cont=function cont(x,D,mixed){var sgn=x<0?-1:1;var B=x*sgn;var P_2=0,P_1=1,P=0;var Q_2=1,Q_1=0,Q=0;var A=Math.floor(B);while(Q_1<D){A=Math.floor(B);P=A*P_1+P_2;Q=A*Q_1+Q_2;if(B-AD){if(Q_1>D){Q=Q_2;P=P_2}else{Q=Q_1;P=P_1}}if(!mixed)return[0,sgn*P,Q];var q=Math.floor(sgn*P/Q);return[q,sgn*P-q*Q,Q]};
/* {‘¼’: ‘¼’,’½’: ‘½’,’¾’: ‘¾’,’⅓’: ‘⅓’,’⅔’:’⅔’,’⅕’:’⅕’,’⅖’:’⅖’,’⅗’:’⅗’,’⅘’:’⅘’,’⅙’:’⅙’,’⅚’:’⅚’,’⅛’:’⅛’,’⅜’:’⅜’,’⅝’:’⅝’,’⅞’:’⅞’} */
window.tastyRecipesVulgarFractions = JSON.parse(decodeURIComponent(“%7B%22%C2%BC%22%3A%221%2F4%22%2C%22%C2%BD%22%3A%221%2F2%22%2C%22%C2%BE%22%3A%223%2F4%22%2C%22%E2%85%93%22%3A%221%2F3%22%2C%22%E2%85%94%22%3A%222%2F3%22%2C%22%E2%85%95%22%3A%221%2F5%22%2C%22%E2%85%96%22%3A%222%2F5%22%2C%22%E2%85%97%22%3A%223%2F5%22%2C%22%E2%85%98%22%3A%224%2F5%22%2C%22%E2%85%99%22%3A%221%2F6%22%2C%22%E2%85%9A%22%3A%225%2F6%22%2C%22%E2%85%9B%22%3A%221%2F8%22%2C%22%E2%85%9C%22%3A%223%2F8%22%2C%22%E2%85%9D%22%3A%225%2F8%22%2C%22%E2%85%9E%22%3A%227%2F8%22%7D”));
window.tastyRecipesFormatAmount = function(amount, el) {
if ( parseFloat( amount ) === parseInt( amount ) ) {
return amount;
}
var roundType=”frac”;
if (typeof el.dataset.amountShouldRound !== ‘undefined’) {
if (‘false’ != el.dataset.amountShouldRound) {
if ( ‘number’ === el.dataset.amountShouldRound ) {
roundType=”number”;
} else if (‘frac’ === el.dataset.amountShouldRound) {
roundType=”frac”
} else if (‘vulgar’ === el.dataset.amountShouldRound) {
roundType=”vulgar”
} else {
roundType=”integer”;
}
}
}
if (‘number’ === roundType) {
amount = Number.parseFloat(amount).toPrecision(2);
} else if (‘integer’ === roundType) {
amount = Math.round(amount);
} else if (‘frac’ === roundType || ‘vulgar’ === roundType) {
var denom = 8;
if (typeof el.dataset.unit !== ‘undefined’) {
var unit = el.dataset.unit;
if ([‘cups’,’cup’,’c’].includes(unit)) {
denom = 4;
if (0.125 === amount) {
denom = 8;
}
if (“0.1667″ === Number.parseFloat( amount ).toPrecision(4)) {
denom = 6;
}
}
if ([‘tablespoons’,’tablespoon’,’tbsp’].includes(unit)) {
denom = 2;
}
if ([‘teaspoons’,’teaspoon’,’tsp’].includes(unit)) {
denom = 8;
}
}
var amountArray = frac.cont( amount, denom, true );
var newAmount=””;
if ( amountArray[1] !== 0 ) {
newAmount = amountArray[1] + ‘/’ + amountArray[2];
if (‘vulgar’ === roundType) {
Object.keys(window.tastyRecipesVulgarFractions).forEach(function(vulgar) {
if (newAmount === window.tastyRecipesVulgarFractions[vulgar]) {
newAmount = vulgar;
}
});
}
}
if ( newAmount ) {
newAmount=” ” + newAmount;
}
if ( amountArray[0] ) {
newAmount = amountArray[0] + newAmount;
}
amount = newAmount;
}
return amount;
}
}())
(function(){
var buttonClass=”tasty-recipes-convert-button”,
buttonActiveClass=”tasty-recipes-convert-button-active”,
buttons = document.querySelectorAll(‘.tasty-recipes-convert-button’);
if ( ! buttons ) {
return;
}
buttons.forEach(function(button){
button.addEventListener(‘click’, function(event){
event.preventDefault();
var recipe = event.target.closest(‘.tasty-recipes’);
if ( ! recipe ) {
return;
}
var otherButtons = recipe.querySelectorAll(‘.’ + buttonClass);
otherButtons.forEach(function(bt){
bt.classList.remove(buttonActiveClass);
});
button.classList.add(buttonActiveClass);
var unitType = button.dataset.unitType;
var dataset=”nf” + unitType.charAt(0).toUpperCase() + unitType.slice(1);
var convertables = recipe.querySelectorAll(‘span[data-nf-original]’);
convertables.forEach(function(convertable){
if (typeof convertable.dataset.amountOriginalType === ‘undefined’
&& ‘usc’ === convertable.dataset.nfOriginal) {
if (-1 !== convertable.innerText.indexOf(‘/’)) {
convertable.dataset.amountOriginalType=”frac”;
}
if (-1 !== convertable.innerText.indexOf(‘.’)) {
convertable.dataset.amountOriginalType=”number”;
}
Object.keys(window.tastyRecipesVulgarFractions).forEach(function(vulgar) {
if (-1 !== convertable.innerText.indexOf(vulgar)) {
convertable.dataset.amountOriginalType=”vulgar”;
}
})
}
convertable.innerText = convertable.dataset[dataset];
if (typeof convertable.dataset.unit !== ‘undefined’) {
convertable.dataset.unit = convertable.dataset[dataset + ‘Unit’];
}
if (typeof convertable.dataset.amount !== ‘undefined’) {
convertable.dataset.amount = convertable.dataset[dataset];
if (‘metric’ === unitType) {
convertable.dataset.amountShouldRound = parseInt(convertable.dataset.amount) >= 10 ? ‘integer’ : ‘number’;
} else if (typeof convertable.dataset.amountOriginalType !== ‘undefined’) {
convertable.dataset.amountShouldRound = convertable.dataset.amountOriginalType;
} else {
convertable.dataset.amountShouldRound = false;
}
convertable.innerText = window.tastyRecipesFormatAmount(convertable.dataset[dataset], convertable);
}
if (convertable.classList.contains(‘nutrifox-unit’)) {
if (‘gram’ === convertable.dataset[dataset]) {
convertable.innerText=”grams”;
}
}
});
/* Trigger the correct amount if scaling is active */
document.querySelectorAll(‘.tasty-recipes-scale-button-active’).forEach(function(scaleButton){
scaleButton.click();
});
});
});
}())
The post Easy Lemon Dill Hummus appeared first on Roots and Radishes.