When the day feels long and you need a dinner idea that’s both satisfying and simple to prepare, nothing compares to crispy oven baked chicken parmesan. This classic dish offers everything you could want in a meal: tender chicken coated with a golden, crispy crust, topped with tangy marinara sauce and gooey melted cheese. It’s a recipe that feels indulgent but is made healthier by baking instead of frying.
Whether you’re cooking for your family, hosting friends, or treating yourself to something special, this recipe is here to transform any dinner into a memorable one.
A Dinner Recipe That Brings Comfort and Flavor to Your Table
Think about the last time you sat down to a meal that made you close your eyes and savor every bite. Chicken Parmesan is one of those dishes that feels like a warm hug. Its crispy, cheesy, saucy layers create a harmony of flavors that’s hard to resist. Best of all, this baked version is easy to make at home, with no need for deep frying or complicated techniques.
If you’ve been searching for a recipe that will wow your taste buds and be kind to your waistline, this is the perfect solution.
Why Crispy Oven Baked Chicken Parmesan is Perfect for Dinner Tonight
There’s a reason Chicken Parmesan is a staple on Italian-American menus—it’s the ultimate comfort food. This oven-baked recipe takes the best parts of the traditional dish and makes it lighter without sacrificing any of the flavor. Here’s why it’s a must-try:
- Crispy Texture Without Frying: Baking achieves that golden, crunchy coating without extra oil.
- Quick and Easy: Simple steps mean you can have dinner on the table in under an hour.
- Customizable: This recipe is easy to adapt for dietary needs or personal tastes.
- Kid-Friendly: Even picky eaters love the cheesy, crispy goodness.
The Essential Ingredients for Crispy Oven Baked Chicken Parmesan
Every great recipe starts with quality ingredients. Here’s what you’ll need for this dish:
Ingredient | Quantity | Description/Notes |
---|---|---|
Olive Oil | 2 tablespoons | Helps crisp up the breading and adds flavor. |
Chicken Breasts | 2 (about 1 lb) | Choose boneless, skinless chicken for easy preparation. |
Egg | 1 | Used to bind the breading to the chicken. |
Panko Bread Crumbs | 1 cup | Provides a light, crispy texture to the coating. |
Parmesan Cheese | ½ cup | Freshly grated for best flavor. |
Dried Oregano | 1 teaspoon | Adds a classic Italian herb flavor. |
Garlic Powder | ½ teaspoon | Enhances the savory notes of the dish. |
Kosher Salt | 1 teaspoon | Balances and enhances the overall flavor. |
Black Pepper | ½ teaspoon | Adds a subtle heat to the seasoning. |
Marinara Sauce | 1 cup | Choose your favorite store-bought or homemade marinara. |
Shredded Mozzarella | 1 ½ cups | Provides gooey, cheesy goodness. |
Minced Parsley | 2 tablespoons | Optional garnish for color and freshness. |
Step-by-Step Guide to Making Crispy Oven Baked Chicken Parmesan
Ready to get cooking? Follow these simple steps for a foolproof dish that’s as delicious as it is beautiful.
Step 1: Preheat Your Oven
Set your oven to 400°F (200°C). Line a baking sheet with parchment paper and drizzle it with 1 tablespoon of olive oil to prevent sticking and help the breading crisp up.
Step 2: Prepare the Breading Station
You’ll need three shallow bowls or plates for this step:
- First Bowl: Beat the egg until smooth.
- Second Bowl: Combine panko bread crumbs, grated parmesan cheese, dried oregano, garlic powder, salt, and pepper. Mix well.
- Third Bowl: Place the chicken breasts, prepped and ready to coat.
Step 3: Coat the Chicken
Dip each chicken breast into the egg, ensuring it’s fully coated. Next, press it into the breadcrumb mixture, turning to coat all sides evenly.
Step 4: Bake the Chicken
Place the breaded chicken breasts on the prepared baking sheet. Drizzle the remaining olive oil over the top of the chicken. Bake for 20–25 minutes, flipping halfway through to ensure both sides are golden and crispy.
Step 5: Add Marinara and Cheese
Remove the chicken from the oven and spoon marinara sauce over each piece. Sprinkle shredded mozzarella generously on top.
Step 6: Finish Baking
Return the chicken to the oven and bake for an additional 5–7 minutes, or until the cheese is melted and bubbly.
Step 7: Garnish and Serve
Sprinkle minced parsley over the top for a pop of color and freshness. Serve immediately and enjoy!
What Makes This Chicken Parmesan Recipe Special?
Each ingredient in this recipe is chosen for its role in creating the perfect dish:
- Panko Bread Crumbs: These provide a lighter, crunchier coating than traditional bread crumbs.
- Parmesan Cheese: Adds a nutty, salty depth that balances the tanginess of the marinara.
- Marinara Sauce: The acidic brightness of the sauce complements the rich, cheesy layers.
- Olive Oil: Helps the breading achieve that golden, crispy texture in the oven.
Pro Tips for the Best Oven Baked Chicken Parmesan
Achieving restaurant-quality Chicken Parmesan at home is easier than you think. Keep these tips in mind:
- Pound the Chicken: Pound the chicken breasts to an even thickness for faster, more consistent cooking.
- Use Fresh Cheese: Grating your parmesan and using high-quality mozzarella makes a noticeable difference.
- Don’t Skip the Flip: Turning the chicken halfway through baking ensures even crispiness.
- Line Your Pan: Use parchment paper or a non-stick sheet to make cleanup a breeze.
How to Serve Crispy Oven Baked Chicken Parmesan
This dish pairs beautifully with a variety of sides to create a complete, satisfying meal:
- Pasta: Serve over spaghetti or linguine for a classic pairing.
- Salad: A fresh Caesar salad adds a crisp, tangy counterpoint.
- Vegetables: Roasted asparagus or steamed broccoli complement the rich flavors.
- Bread: Garlic bread or a crusty baguette is perfect for soaking up extra marinara.
Creative Twists on Classic Chicken Parmesan
Love to experiment in the kitchen? Here are some ways to customize this recipe:
- Cheese Variations: Swap mozzarella for provolone or use a mix of cheeses like asiago and fontina.
- Spice It Up: Add a pinch of red pepper flakes or cayenne to the breadcrumb mixture for heat.
- Gluten-Free Option: Use gluten-free panko crumbs for a celiac-friendly version.
- Vegetarian Version: Replace chicken with eggplant slices for a delicious eggplant parmesan.
How to Store and Reheat Your Chicken Parmesan
This dish is just as delicious the next day if stored and reheated properly:
- Refrigeration: Place leftovers in an airtight container and refrigerate for up to 3 days.
- Reheating: For best results, reheat in a 350°F oven until warmed through and crispy. Avoid microwaving, as it may make the breading soggy.
- Freezing: Freeze uncooked, breaded chicken for up to 2 months. Bake directly from frozen, adding extra time as needed.
Balancing Flavor and Nutrition in Chicken Parmesan
This oven-baked version is a healthier take on the classic fried dish:
- Lower in Fat: Baking uses significantly less oil than frying.
- High Protein: Chicken provides lean protein for a satisfying meal.
- Customizable: Adjust the cheese or sauce to suit your dietary preferences.
FAQs About Crispy Oven Baked Chicken Parmesan
- Can I use chicken thighs instead of breasts?
Yes! Thighs are juicier but may require a slightly longer cooking time. - What’s the best marinara sauce to use?
Choose a high-quality store-bought sauce or make your own for extra freshness. - Can I prepare this ahead of time?
Yes, you can bread the chicken and refrigerate it for up to 4 hours before baking. - How do I keep the breading from getting soggy?
Make sure to bake on a wire rack or parchment-lined sheet and avoid overloading with sauce. - Can I freeze cooked chicken parmesan?
Absolutely! Freeze in an airtight container and reheat in the oven to maintain crispiness. - Is this recipe kid-friendly?
Definitely! The cheesy, crispy texture is a hit with kids of all ages.
Your Go-To Recipe for a Delicious Dinner Tonight
Crispy oven baked chicken parmesan is a timeless recipe that never fails to impress. With its golden crust, flavorful marinara, and gooey melted cheese, it’s a dish that brings comfort and joy to the table. The best part? It’s healthier and easier than the traditional fried version.
So why wait? Grab your ingredients and start cooking tonight. Once you try this recipe, it’s sure to become a family favorite. Don’t forget to share your results and let others know how you’ve made it your own!
Crispy Oven Baked Chicken Parmesan for Dinner Tonight: A Comforting Classic
Total Time: 45 minutes
Yield: 2 servings
Description
Treat yourself to a comforting, golden, and cheesy delight with this crispy oven baked chicken parmesan recipe. With tender chicken coated in a light, crunchy breading and topped with marinara sauce and gooey mozzarella, it’s the perfect way to elevate your dinner tonight. Best of all, it’s baked—not fried—so you can enjoy a healthier version of this classic dish without sacrificing flavor.
Ingredients
- 2 tablespoons olive oil
- 2 boneless, skinless chicken breasts (about 1 pound)
- 1 egg
- 1 cup panko bread crumbs
- ½ cup parmesan cheese, freshly grated
- 1 teaspoon dried oregano
- ½ teaspoon garlic powder
- 1 teaspoon kosher salt
- ½ teaspoon black pepper
- 1 cup marinara sauce (store-bought or homemade)
- 1 ½ cups shredded mozzarella
- 2 tablespoons minced parsley (optional, for garnish)
Instructions
- Preheat the Oven: Preheat your oven to 400°F (200°C). Line a baking sheet with parchment paper and drizzle 1 tablespoon of olive oil over it.
- Prepare the Breading Station:
- In the first bowl, beat the egg until smooth.
- In the second bowl, combine panko bread crumbs, grated parmesan, oregano, garlic powder, salt, and pepper. Mix well.
- Coat the Chicken:
- Dip each chicken breast into the beaten egg, ensuring it’s fully coated.
- Press the chicken into the breadcrumb mixture, turning to coat all sides evenly.
- Bake the Chicken:
- Place the breaded chicken breasts on the prepared baking sheet.
- Drizzle the remaining 1 tablespoon of olive oil over the top.
- Bake for 20–25 minutes, flipping halfway through to ensure even crispiness.
- Add Marinara and Cheese:
- Remove the chicken from the oven.
- Spoon marinara sauce over each piece, then sprinkle shredded mozzarella generously on top.
- Finish Baking: Return the chicken to the oven and bake for an additional 5–7 minutes, or until the cheese is melted and bubbly.
- Garnish and Serve: Sprinkle minced parsley over the top for added freshness and color. Serve immediately with your favorite sides.
Notes
- Pound the Chicken: For even cooking, pound the chicken breasts to a uniform thickness before breading.
- Use Fresh Cheese: Freshly grated parmesan and high-quality mozzarella elevate the flavor.
- Storage: Leftovers can be refrigerated in an airtight container for up to 3 days.
- Reheating: Reheat in a 350°F oven to maintain the crispiness of the breading.
- Prep Time: 15 minutes
- Cook Time: 30 minutes
- Category: Dinner
- Method: Baking
- Cuisine: Italian-American
window.trCommon={“minRating”:6,”ajaxurl”:”https:\/\/forurenergy.com\/wp-admin\/admin-ajax.php”,”ratingNonce”:””,”postId”:316};
window.TastyRecipes = window.TastyRecipes || {};
window.TastyRecipes.smoothScroll = {
init() {
document.addEventListener( ‘click’, ( e ) => {
let anchor = e.target;
if ( anchor.tagName !== ‘A’ ) {
anchor = anchor.closest( ‘a.tasty-recipes-scrollto’ );
}
if ( ! anchor || ! anchor.classList.contains( ‘tasty-recipes-scrollto’ ) ) {
return;
}
const elementHref = anchor.getAttribute( ‘href’ );
if ( ! elementHref ) {
return;
}
e.preventDefault();
this.goToSelector( elementHref );
});
},
goToSelector( selector ) {
const element = document.querySelector( selector );
if ( ! element ) {
return;
}
element.scrollIntoView( { behavior: ‘smooth’ } );
}
};
document.addEventListener(
‘DOMContentLoaded’,
() => window.TastyRecipes.smoothScroll.init()
);
(function(){
document.querySelectorAll(‘[data-tr-ingredient-checkbox]’).forEach(function(el) {
var input = el.querySelector(‘.tr-ingredient-checkbox-container input[type=”checkbox”]’);
if ( ! input ) {
return;
}
if (input.checked) {
el.dataset.trIngredientCheckbox = ‘checked’;
}
el.addEventListener(‘click’, function(event) {
if ( ‘A’ === event.target.nodeName
|| ‘INPUT’ === event.target.nodeName
|| ‘LABEL’ === event.target.nodeName ) {
return;
}
input.click();
});
input.addEventListener(‘change’, function() {
el.dataset.trIngredientCheckbox = input.checked ? ‘checked’ : ”;
});
});
}());
window.TastyRecipes = window.TastyRecipes || {};
window.TastyRecipes.cookMode = {
wakeLockApi: false,
wakeLock: false,
cookModeSelector: ‘.tasty-recipes-cook-mode’,
init() {
if (“wakeLock” in navigator && “request” in navigator.wakeLock) {
this.wakeLockApi = navigator.wakeLock;
}
const cookModes = document.querySelectorAll(this.cookModeSelector);
if (cookModes.length > 0) {
for (const cookMode of cookModes) {
if (this.wakeLockApi) {
cookMode.querySelector(‘input[type=”checkbox”]’).addEventListener(“change”, event => {
this.checkboxChange(event.target);
}, false);
} else {
cookMode.style.display = “none”;
}
}
}
},
checkboxChange(checkbox) {
if (checkbox.checked) {
this.lock();
} else {
this.unlock();
}
},
setCheckboxesState(state) {
const checkboxes = document.querySelectorAll(this.cookModeSelector + ‘ input[type=”checkbox”]’);
for (const checkbox of checkboxes) {
checkbox.checked = state;
}
},
async lock() {
try {
this.wakeLock = await this.wakeLockApi.request(“screen”);
this.wakeLock.addEventListener(“release”, () => {
this.wakeLock = false;
this.setCheckboxesState(false);
});
this.setCheckboxesState(true);
} catch (error) {
this.setCheckboxesState(false);
}
},
unlock() {
if (this.wakeLock) {
this.wakeLock.release();
this.wakeLock = false;
}
this.setCheckboxesState(false);
}
};
(function(callback) {
if (document.readyState !== “loading”) {
callback();
} else {
document.addEventListener(“DOMContentLoaded”, callback);
}
})(() => {
window.TastyRecipes.cookMode.init();
});
window.TastyRecipes = window.TastyRecipes || {};
window.TastyRecipes.staticTooltip = {
element: null,
tooltipElement: null,
deleting: false,
init( element ) {
if ( this.deleting ) {
return;
}
this.element = element;
this.buildElements();
},
destroy() {
if ( ! this.tooltipElement || this.deleting ) {
return;
}
this.deleting = true;
this.tooltipElement.classList.remove( ‘opened’ );
setTimeout( () => {
this.tooltipElement.remove();
this.deleting = false;
}, 500 );
},
buildElements() {
const tooltipElement = document.createElement( ‘div’ );
tooltipElement.classList.add( ‘tasty-recipes-static-tooltip’);
tooltipElement.setAttribute( ‘id’, ‘tasty-recipes-tooltip’ );
const currentTooltipElement = document.getElementById( ‘tasty-recipes-tooltip’ );
if ( currentTooltipElement ) {
document.body.replaceChild( tooltipElement, currentTooltipElement );
} else {
document.body.appendChild( tooltipElement );
}
this.tooltipElement = document.getElementById( ‘tasty-recipes-tooltip’ );
},
show() {
if ( ! this.tooltipElement ) {
return;
}
const tooltipTop = this.element.getBoundingClientRect().top
+ window.scrollY
– 10 // 10px offset.
– this.tooltipElement.getBoundingClientRect().height;
const tooltipLeft = this.element.getBoundingClientRect().left
– ( this.tooltipElement.getBoundingClientRect().width / 2 )
+ ( this.element.getBoundingClientRect().width / 2 ) – 1;
const posLeft = Math.max( 10, tooltipLeft );
this.maybeRemoveTail( posLeft !== tooltipLeft );
this.tooltipElement.setAttribute( ‘style’, ‘top:’ + tooltipTop + ‘px;left:’ + posLeft + ‘px;’ );
this.tooltipElement.classList.add( ‘opened’ );
},
maybeRemoveTail( removeTail ) {
if ( removeTail ) {
this.tooltipElement.classList.add( ‘tr-hide-tail’ );
} else {
this.tooltipElement.classList.remove( ‘tr-hide-tail’ );
}
},
changeMessage( message ) {
if ( ! this.tooltipElement ) {
return;
}
this.tooltipElement.innerHTML = message;
}
};
window.TastyRecipes.ajax = {
sendPostRequest( url, data, success, failure ) {
const xhr = new XMLHttpRequest();
xhr.open( ‘POST’, url, true );
xhr.send( this.preparePostData( data ) );
xhr.onreadystatechange = () => {
if ( 4 !== xhr.readyState ) {
return;
}
if ( xhr.status === 200 ) {
success( JSON.parse( xhr.responseText ) );
return;
}
failure( xhr );
};
xhr.onerror = () => {
failure( xhr );
};
},
preparePostData( data ) {
const formData = new FormData();
for ( const key in data ) {
formData.append( key, data[key] );
}
return formData;
},
};
window.TastyRecipes.ratings = {
defaultRating: 0,
currentRatingPercentage: 100,
savingRating: false,
init( minRating ) {
this.minRating = minRating;
this.formWatchRating();
this.closeTooltipWhenClickOutside();
this.addBodyClassBasedOnSelectedRating();
this.backwardCompFormRatingPosition();
},
formWatchRating() {
const ratings = document.querySelectorAll(‘.tasty-recipes-no-ratings-buttons [data-rating]’);
if ( ratings.length {
event.preventDefault();
this.defaultRating = event.target.closest( ‘.checked’ ).dataset.rating;
this.setCheckedStar( event.target );
this.maybeSendRating( this.defaultRating, event.target );
this.setRatingInForm( this.defaultRating );
} );
}
},
closeTooltipWhenClickOutside() {
window.addEventListener( ‘click’, e => {
// Bailout (don’t remove the tooltip) when the clicked element is a rating star, or it’s the tooltip itself.
if ( e.target.closest( ‘.tasty-recipes-rating’ ) || e.target.classList.contains( ‘tasty-recipes-static-tooltip’ ) ) {
return;
}
window.TastyRecipes.staticTooltip.destroy();
} );
},
setRatingInForm( rating ) {
const ratingInput = document.querySelector( ‘#respond .tasty-recipes-rating[value=”‘ + rating + ‘”]’ );
if ( ! ratingInput ) {
return;
}
ratingInput.click();
},
addBodyClassBasedOnSelectedRating() {
const ratingInputs = document.querySelectorAll( ‘input.tasty-recipes-rating’ );
if ( ! ratingInputs ) {
return;
}
for ( const ratingInput of ratingInputs ) {
ratingInput.addEventListener( ‘click’, currentEvent => {
const selectedRating = currentEvent.target.getAttribute( ‘value’ );
this.handleBodyClassByRating( selectedRating );
this.toggleCommentTextareaRequired( selectedRating );
} );
}
},
handleBodyClassByRating( rating ) {
if ( rating < this.minRating ) {
document.body.classList.remove( 'tasty-recipes-selected-minimum-rating' );
return;
}
document.body.classList.add( 'tasty-recipes-selected-minimum-rating' );
},
toggleCommentTextareaRequired( rating ) {
const commentTextarea = document.getElementById( 'comment' );
if ( ! commentTextarea ) {
return;
}
if ( rating {
window.TastyRecipes.staticTooltip.changeMessage( response.data.message );
window.TastyRecipes.staticTooltip.show();
this.updateAverageText( response.data, recipeCardElement );
this.maybeFillCommentForm( response.data );
// Hide the tooltip after 5 seconds.
setTimeout( () => {
this.maybeResetTooltip( recipeCardElement, response.data, rating );
}, 5000 );
},
() => {
this.resetTooltip( recipeCardElement );
}
);
},
updateAverageText( data, recipeCardElement ) {
if ( ! data.average ) {
return;
}
this.setRatingPercent( data );
if ( ! data.count ) {
return;
}
const quickLink = document.querySelector( ‘.tasty-recipes-rating-link’ );
if ( quickLink ) {
this.setTextInContainer( quickLink, data );
this.setPartialStar( quickLink );
}
const cardStars = recipeCardElement.querySelector( ‘.tasty-recipes-ratings-buttons’ );
cardStars.dataset.trDefaultRating = data.average;
this.setTextInContainer( recipeCardElement.querySelector( ‘.tasty-recipes-rating’ ), data );
},
setTextInContainer( container, data ) {
if ( ! container ) {
return;
}
if ( data.label ) {
const ratingLabelElement = container.querySelector( ‘.rating-label’ );
if ( ratingLabelElement ) {
ratingLabelElement.innerHTML = data.label;
}
return;
}
const averageElement = container.querySelector( ‘.average’ );
if ( averageElement ) {
averageElement.textContent = data.average;
}
const countElement = container.querySelector( ‘.count’ );
if ( countElement ) {
countElement.textContent = data.count;
}
},
setPartialStar( container ) {
const highestStar = container.querySelector( ‘[data-rating=”‘ + Math.ceil( this.defaultRating ) + ‘”]’ );
if ( highestStar ) {
highestStar.dataset.trClip = this.currentRatingPercentage;
}
},
setRatingPercent( data ) {
this.defaultRating = data.average.toFixed( 1 );
const parts = data.average.toFixed( 2 ).toString().split( ‘.’ );
this.currentRatingPercentage = parts[1] ? parts[1] : 100;
if ( this.currentRatingPercentage === ’00’ ) {
this.currentRatingPercentage = 100;
}
},
setCheckedStar( target ) {
const cardRatingContainer = target.closest( ‘.tasty-recipes-ratings-buttons’ );
const selectedRatingElement = cardRatingContainer.querySelector( ‘[data-tr-checked]’ );
if ( selectedRatingElement ) {
delete selectedRatingElement.dataset.trChecked;
}
const thisStar = target.closest( ‘.tasty-recipes-rating’ );
thisStar.dataset.trChecked = 1;
thisStar.querySelector( ‘[data-tr-clip]’ ).dataset.trClip = 100;
},
maybeFillCommentForm( data ) {
if ( ! data.comment || ! data.comment.content ) {
return;
}
const commentForm = document.querySelector( ‘#commentform’ );
if ( ! commentForm ) {
return;
}
const commentBox = commentForm.querySelector( ‘[name=comment]’ );
if ( ! commentBox || commentBox.value ) {
return;
}
// Add comment details for editing.
commentBox.innerHTML = data.comment.content;
if ( data.comment.name ) {
commentForm.querySelector( ‘[name=author]’ ).value = data.comment.name;
commentForm.querySelector( ‘[name=email]’ ).value = data.comment.email;
}
},
maybeResetTooltip( recipeCardElement, data, rating ) {
if ( this.savingRating === rating ) {
this.resetTooltip( recipeCardElement, data );
}
},
resetTooltip( recipeCardElement, data ) {
window.TastyRecipes.staticTooltip.destroy();
this.savingRating = false;
// Reset the default rating.
const cardRatingContainer = recipeCardElement.querySelector( ‘.tasty-recipes-ratings-buttons’ );
if ( cardRatingContainer ) {
this.defaultRating = ( data && data.average ) ? data.average.toFixed(1) : cardRatingContainer.dataset.trDefaultRating;
cardRatingContainer.dataset.trDefaultRating = this.defaultRating;
this.resetSelectedStar( cardRatingContainer, data );
}
},
resetSelectedStar( cardRatingContainer ) {
const selectedRatingElement = cardRatingContainer.querySelector( ‘[data-rating=”‘ + Math.ceil( this.defaultRating ) + ‘”]’ );
if ( selectedRatingElement ) {
selectedRatingElement.querySelector( ‘[data-tr-clip]’ ).dataset.trClip = this.currentRatingPercentage;
selectedRatingElement.parentNode.dataset.trChecked = 1;
}
const previousSelectedElement= cardRatingContainer.querySelector( ‘[data-tr-checked]’ );
if ( previousSelectedElement ) {
const currentSelectedRating = previousSelectedElement.querySelector(‘[data-rating]’);
if ( currentSelectedRating !== selectedRatingElement ) {
delete previousSelectedElement.dataset.trChecked;
}
}
},
backwardCompFormRatingPosition() {
const ratingsButtons = document.querySelector( ‘#respond .tasty-recipes-ratings-buttons, #tasty-recipes-comment-rating .tasty-recipes-ratings-buttons’ );
if ( ! ratingsButtons ) {
return;
}
const ratingsButtonsStyles = window.getComputedStyle(ratingsButtons);
if ( ! ratingsButtonsStyles.display.includes( ‘flex’ ) ) {
ratingsButtons.style.direction = ‘rtl’;
}
if ( typeof tastyRecipesRating !== ‘undefined’ ) {
// Select the rating that was previously selected in admin.
ratingsButtons.querySelector( ‘.tasty-recipes-rating[value=”‘ + tastyRecipesRating + ‘”]’ ).checked = true;
}
const ratingSpans = ratingsButtons.querySelectorAll( ‘.tasty-recipes-rating’ );
for (const ratingSpan of ratingSpans) {
ratingSpan.addEventListener( ‘click’, event => {
if ( ratingSpan === event.target ) {
return;
}
ratingSpan.previousElementSibling.click();
} );
}
}
};
(function(callback) {
if (document.readyState !== “loading”) {
callback();
} else {
window.addEventListener( ‘load’, callback );
}
})(() => {
window.TastyRecipes.ratings.init( window.trCommon ? window.trCommon.minRating : 4 );
});