The Complete Guide to Hiking Emergency Survival Kits * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: ‘Segoe UI’, Roboto, system-ui, sans-serif; background: #f4f9fc; color: #1a2d3a; line-height: 1.6; padding: 1rem; } .container { max-width: 1200px; margin: 0 auto; background: white; border-radius: 36px; padding: 2rem 1.8rem; box-shadow: 0 12px 40px rgba(0,20,30,0.05); } h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; color: #0a1e2c; } h1 { font-size: 2.3rem; line-height: 1.2; background: linear-gradient(145deg, #1f4a5c, #2a6d7e); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; margin-bottom: 0.4rem; } .subhead { font-size: 1.1rem; color: #2a4d5e; margin-bottom: 1.8rem; border-left: 4px solid #7fc1c5; padding-left: 1rem; background: #eff7fa; border-radius: 0 16px 16px 0; padding: 0.7rem 1.4rem; } .badge-soft { background: #ddeef3; color: #1a5b6b; padding: 0.2rem 1rem; border-radius: 40px; font-size: 0.8rem; font-weight: 500; } a { color: #1f6d7e; text-decoration: none; font-weight: 500; border-bottom: 1px dotted rgba(31,109,126,0.25); transition: 0.2s; } a:hover { color: #0b4857; border-bottom: 2px solid #0b4857; } /* 3D infographic */ .infographic-kit { background: #eef6f9; border-radius: 40px; padding: 2rem 1.5rem; margin: 2rem 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.7rem 1.2rem; border: 1px solid #d4e6ed; box-shadow: inset 0 -2px 0 #c0d6df, 0 8px 18px rgba(30,70,80,0.06); } .kit-center { font-size: 2.8rem; background: #d3e7ef; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; border-radius: 60px; color: #1f5b6b; box-shadow: 0 4px 0 #aac4ce; font-weight: 700; text-align: center; line-height: 1.2; flex-direction: column; font-size: 1rem; } .kit-center i { font-size: 2rem; } .card-3d { background: white; border-radius: 40px 16px 16px 40px; padding: 0.5rem 1.4rem 0.5rem 0.8rem; display: flex; align-items: center; gap: 0.6rem; box-shadow: 0 6px 0 #b6cfd8, 0 8px 18px rgba(20,60,70,0.06); border: 1px solid #cde0e8; font-weight: 500; font-size: 0.95rem; transition: 0.15s; background: #fffffffa; cursor: pointer; } .card-3d i { font-size: 1.4rem; color: #1f6d7e; width: 2rem; text-align: center; } .card-3d:hover { transform: translateY(-4px); box-shadow: 0 10px 0 #a3c2cc, 0 16px 28px rgba(20,60,70,0.10); } .card-3d.active { background: #dceef5; border-color: #1f6d7e; } @media (max-width: 700px) { .infographic-kit { flex-direction: column; align-items: stretch; gap: 0.5rem; } .kit-center { align-self: center; width: 70px; height: 70px; font-size: 0.9rem; } .kit-center i { font-size: 1.6rem; } .card-3d { border-radius: 30px; padding: 0.6rem 1.2rem; } } .kit-detail { background: #f5fbfd; border-radius: 20px; padding: 1rem 1.5rem; margin: 0.5rem 0 1.5rem 0; border-left: 4px solid #1f6d7e; font-size: 0.95rem; } .checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.5rem; background: #f5fbfd; padding: 1.8rem 1.5rem; border-radius: 28px; margin: 2rem 0; border: 1px solid #d5e7ef; } .checklist-item { display: flex; align-items: center; gap: 8px; padding: 0.2rem 0; } .checklist-item input[type=”checkbox”] { width: 18px; height: 18px; accent-color: #1f6d7e; } .progress-bar { background: #d4e6ed; border-radius: 40px; height: 10px; width: 100%; margin: 0.5rem 0; } .progress-fill { background: #1f6d7e; height: 10px; border-radius: 40px; width: 0%; transition: width 0.2s; } .faq-accordion { background: #f4fafc; border-radius: 28px; padding: 0.2rem; margin: 2rem 0; } .faq-item { border-bottom: 1px solid #d3e4ec; padding: 1rem 1.2rem; cursor: pointer; transition: 0.2s; } .faq-item:last-child { border: none; } .faq-question { font-weight: 600; display: flex; justify-content: space-between; align-items: center; } .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease, padding 0.2s; padding: 0 0.2rem; color: #1e3d4a; } .faq-item.open .faq-answer { max-height: 300px; padding: 0.8rem 0.2rem 0.2rem; } .faq-item.open .faq-question i { transform: rotate(180deg); } .cta-section { background: #e3f0f5; padding: 2rem 1.8rem; border-radius: 40px; margin-top: 2.5rem; text-align: center; } .cta-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.2rem; } .cta-btn { background: white; padding: 0.6rem 1.8rem; border-radius: 60px; font-weight: 600; color: #1f5b6b; border: 1px solid #b6d3de; box-shadow: 0 3px 0 #b0cbd6; transition: 0.15s; } .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #9ab7c4; background: #f5fbfd; } @media (max-width: 600px) { .container { padding: 1.2rem 0.8rem; } h1 { font-size: 1.9rem; } .checklist-grid { grid-template-columns: 1fr; } } .internal-link-badge { background: #dceef5; border-radius: 40px; padding: 0.2rem 1rem; font-size: 0.8rem; display: inline-block; margin: 0.2rem 0; } .footnote { font-size: 0.9rem; color: #265b6a; background: #e9f3f7; padding: 0.8rem 1.2rem; border-radius: 20px; margin: 1.5rem 0; } .card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; } .card-item { background: #f0f7fa; padding: 1rem; border-radius: 24px; border: 1px solid #d0e2e9; } @media (max-width: 500px) { .card-grid { grid-template-columns: 1fr; } } .builder-box { background: #f0f9fc; border-radius: 28px; padding: 1.6rem 1.5rem; margin: 2rem 0; border: 1px solid #cde1e8; box-shadow: 0 4px 0 #b2cbd4; } .builder-step { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.8rem 0; align-items: center; } .builder-step label { font-weight: 500; min-width: 100px; } .builder-step select { border: 1px solid #bed8e2; border-radius: 30px; padding: 0.3rem 1rem; background: white; } .builder-result { background: white; padding: 1rem 1.5rem; border-radius: 24px; margin-top: 1.2rem; border: 1px solid #d0e2e9; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; } .kit-tag { background: #e2f0f4; padding: 0.3rem 1.2rem; border-radius: 30px; font-size: 0.9rem; border-left: 3px solid #2b8b9e; color: #103e4b; } .kit-tag i { margin-right: 6px; color: #1f6d7e; } .btn-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; } .btn-group .btn { background: white; border: 1px solid #bed8e2; padding: 0.3rem 1.2rem; border-radius: 40px; cursor: pointer; transition: 0.15s; } .btn-group .btn.active { background: #1f6d7e; color: white; border-color: #1f6d7e; } .btn-group .btn:hover { background: #dceef5; } .comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; } .comparison-card { background: #f5fbfd; padding: 1rem; border-radius: 20px; border: 1px solid #d0e2e9; } .comparison-card ul { list-style: none; padding: 0; } .comparison-card ul li { padding: 0.2rem 0; } .comparison-card ul li i { color: #1f6d7e; margin-right: 6px; }

The Complete Guide to Hiking Emergency Survival Kits

Learn how to build and choose hiking emergency survival kits with the right navigation, first aid, water, food, lighting, shelter and safety essentials for different trails. 3,500+ words
KIT
NAVIGATION
FIRST AID
WATER
FOOD
LIGHTING
WEATHER
SHELTER
Click any system to learn why it belongs in a hiking emergency survival kit.

A hiking emergency survival kit isn’t about carrying the biggest possible bag. It’s about creating a practical system that matches your route, conditions, experience and realistic emergency scenarios. The National Park Service Ten Essentials provides a useful framework because it treats emergency preparedness as a group of systems rather than a random collection of products. If you’re starting with the basics, our guide to a hiking emergency kit explains what belongs in a trail pack and how emergency equipment fits into a normal hiking setup.

πŸŽ’ Need the Short Answer?

A good hiking emergency survival kit should normally be organized around these systems:

πŸ—ΊοΈ Navigation
πŸ’§ Hydration
🍎 Nutrition
🩹 First Aid
πŸ”¦ Illumination
🌦️ Weather Protection
πŸ•οΈ Emergency Shelter
πŸ“± Communication
πŸ”§ Basic Repairs
β˜€οΈ Sun Protection
Build My Kit
Priority: Navigation, Water, Food, First Aid, Lighting, Weather Protection, Emergency Shelter, Communication

What Is a Hiking Emergency Survival Kit?

A hiking emergency survival kit is not necessarily one prepackaged pouch. It can be a purpose-built commercial kit, a personalized kit, or several small emergency systems inside a backpack. The NPS describes the Ten Essentials as categories/systems and notes that additional equipment may be needed depending on activity, location and duration.

Hiking Emergency Kit vs Hiking Survival Kit

Hiking Emergency Kit
  • Focuses on unexpected problems
  • Usually lighter
  • Day-hike friendly
  • Route-specific
Hiking Survival Kit
  • Broader preparedness
  • Can be more comprehensive
  • Often useful for remote trips
  • Environment-specific

The terms overlap heavily. Choose based on contents and suitability, not the word “survival” on the packaging.

The 10 Systems Every Hiking Emergency Kit Should Consider

The NPS organizes its Ten Essentials around: Navigation, Sun Protection, Insulation, Illumination, First Aid, Fire/approved emergency heat, Basic Repair, Nutrition, Hydration, and Emergency Shelter.

1. Navigation: Your Kit Should Help You Know Where You Are

Route information, map, compass, GPS/navigation device, offline map, backup navigation method, knowing how to use the equipment. American Hiking Society recommends carrying a paper map and compass as backup because phones and GPS devices may not always be reliable. Good navigation starts before the trailhead, which is why trail safety planning should be part of your kit-building process.

2. First Aid: Build Around Your Actual Trip

A first-aid kit doesn’t need to contain every medical product imaginable. Focus on common minor hiking injuries, personal needs, group considerations, checking expiration dates, and knowing how to use supplies. American Hiking Society recommends customizing a personal first-aid kit. If you’re starting from scratch, our guide on how to build an emergency kit can help you organize your supplies.

3. Water and Hydration

Planned water, trip duration, weather, terrain, known sources, appropriate treatment methods, backup planning. American Hiking Society includes water and a way to purify it among its Ten Essentials. Requirements depend on conditions, exertion, route and individual needs.

4. Food: Prepare for Delays

Emergency food is different from normal trail snacks. Potential delays: route-finding, slower pace, weather, unexpected trail conditions, longer rest periods, changing plans. American Hiking Society recommends extra food because unexpected delays can extend a trip. Our guide to emergency supplies for hikers goes deeper into carrying backup supplies without overpacking.

5. Lighting: The Small Item People Forget

A hiking emergency can happen after sunset even if you never planned to hike at night. Headlamp, backup lighting, spare batteries, accessibility inside the pack. The NPS specifically recommends illumination and identifies headlamps as a preferred hands-free option. See trail-ready gear for more.

6. Emergency Shelter and Weather Protection

Unexpected weather can turn a normal delay into a serious problem. Emergency blanket, tarp, bivy, rain protection, extra layers. The NPS identifies emergency shelter as one of the Ten Essentials. For longer trips, explore Adventure Supplier’s camping shelter collection.

7. Sun and Weather Protection

Sun: sunglasses, sunscreen, hat, appropriate clothing. Weather: rain protection, insulating layer, dry layer, route-specific clothing. The NPS includes both sun protection and insulation among its Ten Essentials.

8. Communication

Cell coverage varies, batteries run out, remote areas can lack service. The NPS specifically notes that a cellphone is not a substitute for the Ten Essentials and that service may not be available. If your route is particularly remote, read our guide to preparing for the unexpected on remote hiking trails before deciding how comprehensive your emergency kit needs to be.

9. Basic Repair and Equipment Problems

Gear repair materials, patches, appropriate tape, cordage where suitable, spare fasteners, equipment-specific repair items. The NPS includes repair supplies/tools within the Ten Essentials framework.

Build Your Kit

Short Day HikeLong Day HikeRemote HikeOvernight Trip
Stable WeatherChangeable WeatherCold/WetHot/Sunny
BeginnerWeekend HikerExperienced
Select options above to see your kit priorities.

Emergency Kit for a Day Hike

SystemPriority
NavigationEssential
WaterEssential
FoodEssential
First AidEssential
LightingEssential
Weather ProtectionEssential
Emergency ShelterRoute-dependent
Communication PlanEssential
Repair SuppliesRoute-dependent
Sun ProtectionEssential

For a short outing, compare this framework with our day hike emergency planning guide to see how your everyday pack can be adjusted without overpacking.

Premade Kit vs DIY Hiking Emergency Kit

Premade Kit
  • Convenient
  • Faster to purchase
  • Easy starting point
  • May contain unnecessary items
  • Contents vary
DIY Kit
  • Personalized
  • Can fit your route
  • You control every item
  • Requires research
  • Can be upgraded gradually

For beginners: a reputable premade kit can be a starting point. For experienced hikers: a personalized system can better match the route. For everyone: inspect the actual contents rather than buying based only on the word “survival.” Before purchasing a premade option, read what to look for in a hiking survival kit so you can evaluate the contents.

How to Evaluate a Hiking Emergency Survival Kit Before Buying

1. Is it appropriate for my route? 2. Do I understand what every major component is for? 3. Can I actually use the equipment? 4. Does it duplicate equipment already in my backpack? 5. Does it account for weather and duration? 6. Is it compact enough for my trip? 7. Does it contain genuinely useful categories rather than filler items? 8. Can I customize it?

Don’t Judge a Kit by How Many Items It Contains

❌ 50 ITEMS β‰  βœ… BETTER KIT

A good emergency kit solves realistic problems. Ten well-chosen systems can be more useful than a pouch packed with dozens of unrelated objects. If your biggest concern is unnecessary weight, see our guide on emergency supplies for hikers: planning without overpacking.

Organize Your Kit So You Can Find It Quickly

πŸ”΄ EMERGENCY NOW: Items you may need quickly (navigation, lighting, communication).
🟠 EMERGENCY SUPPORT: Items for changing conditions or delays (weather protection, extra food, shelter).
🟒 ROUTE SUPPORT: Navigation, hydration and other routine systems.

Emergency Survival Kit Checklist

Navigation system
Backup navigation
Water
Water-treatment method when appropriate
Extra food
First-aid supplies
Personal medical necessities
Headlamp/light
Backup power appropriate to trip
Weather protection
Extra layer
Emergency shelter
Sun protection
Communication plan
Basic repair supplies
Route information
Trip plan shared
0/17 checked β€” Kit Readiness: 0%

How to Maintain Your Hiking Emergency Kit

Before Every Hike: Check weather, route, supplies, water, food, lighting, battery levels, first-aid supplies.
Monthly/Seasonally: Check expiration dates, damaged packaging, worn equipment, batteries, clothing layers, emergency shelter. The NPS recommends checking first-aid supplies for expiration and replacing items as needed.

The easiest way to keep your kit ready is to make emergency gear part of your hiking routine rather than checking everything only once a year.

Build Your Kit Around the Trail, Not the Internet

Trail type: Forest trail β‰  exposed mountain route. Duration: 2 hours β‰  2 days. Weather: Stable conditions β‰  rapidly changing conditions. Remoteness: Busy trail β‰  isolated backcountry. Experience: Beginner β‰  experienced navigator. There is no single perfect hiking emergency survival kit for every hiker.

Common Hiking Emergency Kit Mistakes

  • Buying the Biggest Kit
  • Never Checking Contents
  • Ignoring Weight
  • Forgetting Navigation
  • Forgetting Lighting
  • Ignoring Weather
  • Forgetting Personal Needs
  • Never Practicing

American Hiking Society specifically emphasizes becoming familiar with the Ten Essentials and knowing how to use them.

Emergency Kit for Beginners

Start With: Navigation β†’ Water β†’ Food β†’ First Aid β†’ Lighting β†’ Weather Protection β†’ Emergency Shelter β†’ Communication Plan. Add specialized equipment only when the route actually requires it. See our hiking preparedness guide for beginners.

Before You Leave: 60-Second Kit Check

ROUTE? Do I know where I’m going? WEATHER? Have I checked current conditions? WATER? Do I have an appropriate plan? FOOD? Do I have enough for the expected trip plus reasonable contingency? LIGHT? Do I have working illumination? FIRST AID? Is my kit ready? SHELTER? Does the route require emergency shelter? CONTACT? Does someone know my plan?

For a more detailed pre-departure routine, use our hiking emergency checklist before leaving the trailhead.

How the Entire 15-Post Hiking Safety Web Fits Together

Post 1: Emergency Kit Basics
Post 2: Trail Safety Planning
Post 3: Build an Emergency Kit
Post 4: Hiking Safety Gear
Post 5: Why Preparedness Matters
Post 6: Day Hike Planning
Post 7: Choosing a Survival Kit
Post 8: Trail-Ready Gear
Post 9: Emergency Gear Routine
Post 10: Beginner Preparedness
Post 11: Supplies Without Overpacking
Post 12: Pre-Trail Checklist
Post 13: Outdoor Safety Essentials
Post 14: Remote Trail Preparation
Post 15: COMPLETE SURVIVAL KIT GUIDE

For more on any topic, explore our complete hiking safety web. If you’re planning a remote route, see preparing for the unexpected on remote hiking trails. For a broader safety overview, read outdoor safety essentials.

What should be in a hiking emergency survival kit?
A kit should be built around the Ten Essentials and adjusted for your route, duration, weather, remoteness and personal needs. Core categories include navigation, water, food, first aid, lighting, weather protection and emergency shelter. See our hiking emergency kit.
Is a hiking emergency kit the same as a survival kit?
The terms overlap, but a survival kit may be broader. The important thing is whether the kit contains useful systems for your specific hiking conditions. See what to look for in a hiking survival kit.
Should I buy a premade hiking survival kit?
A premade kit can be a convenient starting point, especially for beginners, but always inspect its contents and customize it for your route.
How much should a hiking emergency kit weigh?
There isn’t one universal weight. Weight should be considered alongside distance, terrain, duration, weather and remoteness. See emergency supplies for hikers.
Do I need a first-aid kit on a short hike?
A suitable first-aid setup is part of the Ten Essentials framework, even for shorter hikes. The contents can be adjusted to the route and group.
Can my phone replace a hiking emergency kit?
No. The NPS specifically states that a cellphone isn’t a substitute for the Ten Essentials because service may be unavailable and batteries may not last for the entire trip.
Do I need emergency shelter on a day hike?
It depends on the route and conditions. Remote, exposed or unpredictable environments can justify carrying more contingency equipment. See day hike emergency planning.
How often should I check my emergency kit?
Check it before trips and periodically for expired, damaged or depleted supplies. The NPS recommends checking first-aid supplies and replacing expired items. See emergency gear routine.
What is the most important item in a hiking emergency kit?
There isn’t one universal “most important” item. Emergency preparedness works as a system: navigation, hydration, protection, communication and other essentials support one another. See outdoor safety essentials.
How do I avoid overpacking?
Start with your route and likely problems. Carry equipment because it solves a realistic need rather than because it is marketed as “survival gear.” See emergency supplies for hikers.

πŸŽ’ Ready to Prepare Your Hiking Pack?

Once you’ve identified what your route actually requires, you can explore Adventure Supplier for hiking and outdoor equipment, or browse the shop to compare available gear.

Don’t buy first. Plan first.

// 3D infographic detail const kitDetails = { nav: ‘NAVIGATION: Helps you stay oriented and supports route planning. Map, compass, GPS, offline maps, and backup navigation.’, aid: ‘FIRST AID: Supports common minor injuries and personal needs. Bandages, blister care, tape, gauze, personal medications.’, water: ‘WATER: Helps you plan water and appropriate treatment options. Carry enough for your trip and know where to refill.’, food: ‘FOOD: Provides backup food when plans change. Extra snacks, energy bars, and meal options for unexpected delays.’, light: ‘LIGHTING: Provides light when a hike runs later than expected. Headlamp with backup batteries or power source.’, weather: ‘WEATHER: Helps protect against changing conditions. Rain shell, extra layers, sun protection, and appropriate clothing.’, shelter: ‘SHELTER: Provides additional protection when conditions require it. Emergency blanket, bivy, tarp, or lightweight shelter.’ }; const kitCards = document.querySelectorAll(‘.card-3d’); const kitDetail = document.getElementById(‘kitDetail’); kitCards.forEach(card => { card.addEventListener(‘click’, function() { kitCards.forEach(c => c.classList.remove(‘active’)); this.classList.add(‘active’); const key = this.dataset.detail; kitDetail.textContent = kitDetails[key] || ‘Click a system for details.’; }); }); // Kit selector const kitBtns = document.querySelectorAll(‘#kitSelector .btn’); const kitPriority = document.getElementById(‘kitPriority’); const priorities = { day: ‘Priority: Navigation, Water, Food, First Aid, Lighting, Weather Protection, Communication’, weekend: ‘Priority: Navigation, Water, Food, First Aid, Lighting, Weather Protection, Emergency Shelter, Communication, Repair Supplies’, remote: ‘Priority: Navigation backup, Water treatment, Extra Food, First Aid, Lighting, Weather Protection, Emergency Shelter, Communication, Repair Supplies’, overnight: ‘Priority: Navigation, Water + Treatment, Food + Extra, First Aid, Lighting, Weather Protection, Shelter, Communication, Repair Supplies, Contingency’, beginner: ‘Priority: Navigation, Water, Food, First Aid, Lighting, Weather Protection, Communication. Start simple, add as needed.’ }; kitBtns.forEach(btn => { btn.addEventListener(‘click’, function() { kitBtns.forEach(b => b.classList.remove(‘active’)); this.classList.add(‘active’); const kit = this.dataset.kit; kitPriority.innerHTML = ‘Priority: ‘ + priorities[kit]; }); }); // Kit builder document.getElementById(‘kitBuildBtn’).addEventListener(‘click’, function() { const type = document.getElementById(‘kitType’).value; const cond = document.getElementById(‘kitCond’).value; const exp = document.getElementById(‘kitExp’).value; let items = [‘Navigation’, ‘Water’, ‘Food’, ‘First Aid’, ‘Lighting’, ‘Weather Protection’, ‘Communication’]; if (type === ‘remote’ || type === ‘overnight’) items.push(‘Emergency Shelter’, ‘Repair Supplies’, ‘Navigation Backup’); if (cond === ‘cold’ || cond === ‘changeable’) items.push(‘Extra Layers’, ‘Weather Protection’); if (cond === ‘hot’) items.push(‘Sun Protection’, ‘Extra Water’); if (exp === ‘beginner’) items.push(‘Simple, easy-to-use items’); const html = items.map(t => ` ${t}`).join(‘ ‘); document.getElementById(‘kitBuildResult’).innerHTML = html; }); // Kit checklist progress const kitChecks = document.querySelectorAll(‘.kit-check’); const kitFill = document.getElementById(‘kitFill’); const kitResult = document.getElementById(‘kitCheckResult’); function updateKitProgress() { const total = kitChecks.length; const checked = document.querySelectorAll(‘.kit-check:checked’).length; const pct = total > 0 ? Math.round((checked / total) * 100) : 0; kitFill.style.width = pct + ‘%’; kitResult.textContent = `${checked}/${total} checked β€” Kit Readiness: ${pct}%`; } kitChecks.forEach(cb => cb.addEventListener(‘change’, updateKitProgress)); document.getElementById(‘kitCheckBtn’).addEventListener(‘click’, updateKitProgress); // FAQ accordion document.querySelectorAll(‘#faqAccordion15 .faq-item’).forEach(item => { item.addEventListener(‘click’, function(e) { if (e.target.tagName === ‘A’) return; this.classList.toggle(‘open’); }); });