You don’t have to be an athlete or a jock to get jock itch. However, it’s most common in athletes because they sweat more than the average person and often wear sweaty clothing for long periods of time.

This can make for the perfect breeding ground for the bacteria that causes this frustrating fungal infection.

While it isn’t the most appealing topic, jock itch is rather common. In fact, studies have shown that about 10 percent to 20 percent (or even up to 25 percent) of the world population is affected by fungal skin infections!

It’s important to note that candida symptoms can be similar to or even trigger jock itch.

Luckily, getting rid of jock itch is simple. With proper hygiene, the right foods and essential oils, the infection usually responds within a couple of weeks. Let’s look at some of the best natural remedies and more!

What is jock itch?

Jock itch, medically known as tinea cruris, or ringworm of the groin, is an infection of the groin area caused by fungus and can be rather annoying to anyone who has it.

As the common name implies, it causes an itching or a burning sensation in the groin area, thigh skin folds or anus.

However, tinea cruris may not affect the penis or scrotum — though may involve the inner thighs and genital areas, as well as extend back to the perineum and perianal areas.

The genus of fungi is called trichophyton, which includes the parasitic varieties that cause tinea cruris. Trichophyton fungi also includes athlete’s foot, ringworm infections, and similar infections of the nail, beard, skin and scalp.

Tinea corporis is an actual fungus infection that may affect the entire body.

Does jock itch occur in both males and females? Yes, though it’s more frequently seen in males.

It’s also known as:

  • crotch itch
  • crotch rot
  • Dhobi itch
  • eczema marginatum
  • gym itch
  • jock rot
  • scrot rot
  • ringworm of the groin

The fungus that causes jock itch thrives in warm, moist areas and occurs mostly in adult men and teenage boys. It can be triggered by friction from clothes and prolonged wetness in the groin area, such as from sweating.

Is jock itch contagious? Technically yes, as it can be passed from one person to the next by direct skin-to-skin contact or contact with unwashed clothing, such as bathing suits, that have been touched or shared.

If you have athlete’s foot, it can even be passed by touching your own feet or socks, then touching your groin area.

Hot and humid weather can add to the cause. Plus, people who have certain health conditions, such as obesity or diseases that cause problems with the immune system, are more likely to develop it.

Jock itch is caused by several types of mold-like fungi called dermatophytes, including Epidermophyton floccosum, Trichophyton mentagrophytes and T. rubrum.

Everyone has microscopic fungi and bacteria living on his body, and dermatophytes are among them. Dermatophytes live on the dead tissues of your skin, hair and nails and thrive in warm, moist areas, like the insides of the thighs.

When the groin area gets sweaty and isn’t dried properly, it traps heat and moisture, providing a perfect environment for the fungi to live and grow.

Symptoms

You can usually self-diagnose jock itch by how your skin looks.

If you feel the need to check in with your healthcare provider or dermatologist, call to make an appointment. Tests are usually not necessary.

However, you may need an office test called a KOH exam or a skin culture. Don’t worry — these tests are very simple and relatively painless, but they may help better identify the severity and diagnosis.

Common symptoms of jock itch include:

  • Red, raised, scaly patches that may blister and ooze — and often have sharply defined edges
  • Patches are often redder around the outside with normal skin tone in the center
  • Abnormally dark or light skin, sometimes permanently
  • Itching, chafing or burning in the groin, thigh or anal area
  • Flaking, peeling or cracking skin
  • Rash that’s exacerbated by exercising

Keep in mind that if the infection lasts longer than two weeks, is severe or continues to return, you may need treatment by a healthcare provider.

Causes and risk factors

Jock itch is caused by fungi known as dermatophytes, which thrive in warm, moist environments.

It is primarily caused by dermatophytes, fungi that also cause ringworm and athlete’s foot. These fungi thrive in moist, warm areas and can easily spread from one part of the body to another or from person to person.

Jock itch also often spreads from athlete’s foot if a person touches his feet and then touches the groin area without washing his hands.

Lack of proper hygiene can allow fungal growth as well, especially if sweat and moisture accumulate.

Risk factors:

  • Excessive sweating: People who sweat a lot, such as athletes or those living in hot climates, are more prone to jock itch.
  • Tight or non-breathable clothing: Clothing that traps moisture and doesn’t allow the skin to breathe increases the risk, as fungi thrive in these conditions.
  • Male gender: Jock itch is more common in men than women, possibly due to anatomical and hormonal factors that contribute to a warmer, moister environment in the groin area. It’s also extremely common in male teenagers.
  • Compromised immune system: People with weakened immune systems are at higher risk for fungal infections, as their bodies are less able to fight off pathogens. Diabetes can also increase the risk of fungal infections.
  • Obesity: Excess body weight can create skin folds that trap moisture, providing an ideal environment for fungi to grow.
  • Sharing personal items: Sharing towels, clothing or sports equipment can spread the fungi responsible for jock itch.

How to prevent

To avoid every getting jock itch, the best thing you can do is have good hygiene. Here are a few key tips to help prevent jock itch:

  • Shower or take a bath daily, especially after playing sports.
  • Keep the area as dry as possible by always using a clean towel after showering or swimming.
  • Avoid sharing towels.
  • Try to avoid wearing tight-fitting clothing and undergarments.
  • Wash athletic supporters as often as possible.
  • Change clothes and undergarments daily.

It’s important to note that if you have a fungal infection somewhere else on your body, like athlete’s foot or ringworm, be sure to treat it to help prevent the fungus from spreading to your groin area.

There are some things you can do to prevent the spread. Make sure you don’t touch or scratch your groin area after touching your feet, for example.

It’s important to use a separate towel on your feet after showering or dry your groin before your feet so the towel doesn’t spread the infection.

Put your socks on before your underwear to cover your feet so the germs do not get on your underwear.

Immediate jock itch treatment

Jock itch usually responds to self-care within a couple of weeks by providing some some basic practices, such as:

  • Keep the skin clean and dry in the groin area. When cleaning the area, dry with a clean towel. It’s important that you don’t use the same towel on the rest of your body. Use a separate, clean towel instead.
  • Don’t wear clothing that rubs and irritates the area.
  • Shower immediately after athletic activities.
  • Don’t scratch!
  • Wear loose-fitting underwear.
  • Wash athletic supporters frequently.
  • Change your clothes, especially undergarments, daily.
  • Avoid heavily perfumed fabric conditioners and washing powders, as they may cause additional irritation.
  • Treat any other fungal infections you may have, such as athlete’s foot, because they’re similar and can cause the problem to linger, reoccur and spread if not treated.
  • Before trying over-the-counter antifungal or drying powders, which can contain lots of chemicals, try a natural remedy.
  • If it doesn’t get better within a few weeks, you may need to see your doctor to discuss your options.

Conventional jock itch treatment includes using powder sprays, often containing the antifungal clotrimazole. Clotrimazole is also the primary antifungal and so-called “active ingredient” present in the brand Lotrimin®.

Lotrimin® is available in both cream and powder spray form. The most common side effects of clotrimazole include redness, irritation, burning, stinging, swelling, tenderness, pimple-like bumps or flaking of the treated skin.

LamisilAT® is another common conventional treatment but uses a different antifungal called terbinafine. LamisilAT® is used more often to treat fungus that affects the fingernails or toenails (onychomycosis).

Common side effects include stomach upset (diarrhea, gas, nausea, stomach pain), headache, dizziness, mild skin rash, itching or even unpleasant/unusual taste or loss of taste in the mouth.

Natural remedies

While there are a variety of commercially made, synthetic lotions and sprays that you can purchase, natural remedies from plants can be just as effective due to their antifungal qualities. Plus, they cost way less and provide a chemical-free approach to healing.

The Department of Pharmaceutical Sciences at the University of Kashmir in India reported that natural remedies from plants are gaining popularity because of these obvious advantages in addition to having fewer side effects, helping patients tolerate them far better than synthetics.

Natural remedies from plants are becoming far more acceptable due to a long history of use.

For these reasons, several plants have been investigated for treatment of skin diseases ranging from itching to skin cancer, and some these remedies below are perfect examples of how you can get rid of jock itch.

1. Change your diet

Changes in your diet can make a big difference in treatment and prevention of jock itch.

Foods that are high in sugars and carbohydrates often encourage fungus growth. Consider more whole fruits and vegetables daily.

It’s also important to note that alcohol, especially beer, can cause yeast to grow. By reducing or eliminating your alcohol consumption, you may be able to keep jock itch problems from arising in the first place.

2. Apple cider vinegar

Because the acids in apple cider vinegar act as antibacterial agents, it can be a great option for treating bacterial jock itch. In addition, the antifungal activity of apple cider vinegar fights candida and fungus growth, including jock itch.

Combine equal parts apple cider vinegar and water into a spray bottle. You can place it in the refrigerator to provide a cooling effect that will bring added relief when applied to the inflamed skin.

For an even more complex jock itch home remedy, check out the DIY recipe below that uses essential oils as well as apple cider vinegar.

3. Cornstarch

Cornstarch is another natural remedy for jock itch. It is derived from dried corn kernels and is the primary ingredient in baby powders.

It can help the skin have a fresh, dry feeling while soothing the burning, raw effects from scratching the infected areas.

This can be applied after any of these treatments, once the area is dry, and can also be a great preventive method. (Note: Some readers have found cornstarch unhelpful to their jock itch issues.)

4. Oatmeal and Epsom salt bath

This can be a relaxing way to achieve relief and healing. Add two cups of oatmeal and one cup of Epsom salt to a bath tub filled with warm water. Soak your body in the tub for about 20 minutes.

Make sure the water is not too hot since hot water can cause itchy skin and you want to avoid further irritation. As a bonus for some added healing and relaxation, you can add 10–20 drops of lavender oil.

Colloidal oatmeal works especially well, according to research.

5. Garlic and honey

Garlic and honey are to provide relief because garlic is a natural bacteria killer while the honey soothes and helps control the itchy sensation associated with jock itch.

A study conducted in China looked to better understand the key components of garlic and its ability to fight infection. The main ingredients of garlic oil were identified as sulfides, mainly including disulfides (36 percent), trisulfides (32 percent) and monosulfides (29 percent) by gas chromatograph-mass spectrometer (GC/MS), which were estimated as the dominant antifungal factors.

The good news is that the study indicated that the high antifungal effects of garlic oil make it a broad application prospect within antifungal environments.

Although the garlic can cause a slight irritation, because the honey acts as a moisturizer, it should counteract this effect.

Chop the garlic into very small pieces, or mince it and mix it with organic or unfiltered honey and a little warm water to make a paste. Apply it to the infected skin area two times a day for 15 minutes.

Wash thoroughly, and let the area dry before putting on clothing.

You can also apply at night before you go to bed and leave on overnight.

Another option is to try increasing your garlic intake orally. You can do this by simply eating more raw garlic in your favorite dishes or taking garlic capsules that you make yourself or buy at your local health food store.

6. Calendula

Calendula is a natural antiseptic and anti-inflammatory. It comes from calendula flowers or marigolds, providing wonderful skin-protecting properties.

Calendula may be perfect for anyone who has sensitive skin because it’s very soothing and calming.

The flowers of marigold have long been employed in folk therapy, and more than 35 properties have been attributed as benefits from the flowers — all of which make it a good option to treat jock itch.

7. Lavender oil

Lavender oil benefits the skin because it’s a great antiseptic that contains antifungal properties.

It’s very helpful in rapidly treating wounds and may aid in preventing the formation of scar tissue. And because it’s mild, it is typically safe to use on children.

Research published in Medical Mycology reported that lavender oil is highly effective and fighting infection and, therefore, may reduce fungal progression and the spread of infection in host tissues.

8. Tea tree oil

Tea tree oil is great way to treat jock itch because it has powerful antifungal qualities and is a natural antiseptic and germicide that helps reduce itchiness and inflammation of the skin.

Research has shown that tea tree oil, tested at different various concentrations, possesses antifungal activity and can help fight jock itch fungus.

Try combining three to four drops of tea tree oil with one ounce olive oil or coconut oil, and apply to the area twice daily. Allow it to soak into the skin.

Tea tree oil can sting a bit, so make sure to dilute with the base oils first.

9. Aloe vera

Aloe vera is one of the best natural remedies to treat any skin infection. It has antifungal, anti-inflammatory, antiseptic and antibacterial properties that may reduce your discomfort.

In addition, aloe vera penetrates deeply into the lower levels of the skin, bringing its remarkable properties to where they’re most needed.

Although aloe is 99 percent water, aloe gel also contains a substance known as glycoprotein. Glycoprotein speeds the healing process by stopping pain and inflammation. It may also help stimulate the immune system.

Precautions

While you can use various remedies, discontinue use of anything that develops a rash or irritation.

Use caution if you have any medical conditions, especially if it requires a prescribed medication.

Always check with your doctor before using any essential oils, especially on children and pregnant women.

Print

Jock Itch Remedy


5 Stars 4 Stars 3 Stars 2 Stars 1 Star

No reviews


  • Author:
    Dr. Josh Axe
  • Total Time: 5 minutes

  • Yield: 30 uses

Print Recipe

Pin Recipe

const share_pin_buttons = document.getElementsByClassName( ‘share-pin button’ );
if ( share_pin_buttons ) {
for ( let share_key = 0; share_key {
e.stopPropagation();
window.open(e.target.dataset.href,’targetWindow’,’toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=500′);
return false;
} );
}
}

Description

This is not just any DIY jock itch. I suggest you use a strong concoction of essential oils, a vital carrier oil like coconut oil, a strong anti-inflammatory oil like neem oil and some apple cider vinegar, which acts as a potent antifungal agent.


Ingredients

  • 2 ounces coconut oil
  • 2 ounces neem oil
  • 10 drops lavender essential oil
  • 10 drops myrrh oil
  • 5 drops tea tree oil
  • [optional] 3 drops oregano oil
  • 1 ounce apple cider vinegar


Instructions

  1. Combine all ingredients except for the apple cider vinegar (ACV) into a glass jar and blend well. (If the coconut oil is solid, simply put the closed jar with the mix in hot water, which will melt the coconut oil.)
  2. Next add the ACV to the mixture and blend.
  3. Clean and pat dry the affected area.
  4. Rub onto the affected areas twice daily — once in the morning and again at night.
  5. You may want to keep in the refrigerator to provide a cooling sensation for added relief.

Notes

You may experience layers of skin peeling off of you. This is normal. If irritation occurs, discontinue use or reduce the amount of essential oils by half and try again.

  • Prep Time: 5 min
  • Category: Home remedies

window.trCommon={“minRating”:6,”ajaxurl”:”https:\/\/draxe.com\/wp-admin\/admin-ajax.php”,”ratingNonce”:””,”postId”:40314};
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()
);

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 );
});

The post How to Get Rid of Jock Itch: 9 Natural Remedies appeared first on Dr. Axe.