JSFiddle - React, Tailwind, and code Playground

by Irina Fedorova

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

<div id="outer-wrap">
  	
	<!-- Navigation -->
	<nav class="mainNav">
		<h3 class="first-level-section-nav">Level 1 - Item 1</h3>
		<ul>
				<li class="second-level-section-nav"><a href="http://www.google.com">Level 2 - Item 1</a>
					<ul>
						<li class="third-level-section-nav"><a href="#">Level 3 - Item 1</a>
							<ul>
								<li class="forth-level-section-nav"><a href="#">Level 4 - Item 1</a>
									<ul>
										<li class="fifth-level-section-nav"><a href="#">Level 5 - Item 1</a>
											<ul>
												<li class="sixth-level-section-nav"><a href="#">Level 6 - Item 1</a></li>
												<li class="sixth-level-section-nav"><a href="#">Level 6 - Item 2</a></li>
											</ul>
										</li>
									</ul>
								</li>
							</ul>
						</li>
						<li class="third-level-section-nav"><a href="#">Level 3 - Item 2</a></li>
						<li class="third-level-section-nav"><a href="#">Level 3 - Item 3</a></li>
						<li class="third-level-section-nav"><a href="#">Level 3 - Item 4</a></li>
				
					
					</ul>
				</li>
				<li class="second-level-section-nav"><a href="#">Level 2 - Item 2</a></li>
				<li class="second-level-section-nav"><a href="#">Level 2 - Item 3</a></li>
	
		</ul>
	</nav>

</div>

CSS

/* Example Styles
	-----------------------------------------------*/
	
		/* General
		-----------------------------------------------*/
		body {
			margin:50px; 
			font:14px/1.5em Arial, Helvetica, serif;
		}
		* {-webkit-box-sizing: border-box;	-moz-box-sizing: border-box;  box-sizing: border-box; -ms-box-sizing: border-box;}
		
		/* Left Navigation
		-----------------------------------------------*/
		.mainNav {
			background: ;
			width: 300px;
		}
			/* First Level */
			.mainNav ul {
				margin: 0;
				padding: 0;
				list-style: none;
				border-bottom: 1px solid #444
			}
			.mainNav ul li {
				border-top: 1px solid #444;
				background: #f6f6f6;
			}
			.mainNav ul li a {
				color: #333;
				display: block;
				font-size: 1.1em;
				line-height: normal;
				padding:12px 20px;
				text-decoration:none;
			}
			.mainNav ul li a:hover {
				background: #ccc;
				text-decoration: none;
			}
				/* Second Level */
				.mainNav ul ul {
					border-bottom: none
				}
				.mainNav ul ul li {
					border-top: 1px solid #222;
					background: #;
				}
				.mainNav ul ul li a {
					color: #333;
					display: block;
					font-size: 1em;
					line-height: normal;
					padding: 0.5em 1em 0.5em 2.5em;
				}
				.mainNav ul ul li a:hover {
					background: #ccc;
				}
						/* Third Level */
				.mainNav ul ul ul li {
					border:none;
				}
				.mainNav ul ul ul li a {
					padding-left:3.5em; 
				}
			/* Accordion Button */
			ul li.has-subnav .accordion-btn {
				color:#333; 
				background:rgba(255,255,255, 0.15); font-size:16px;
			}
			
			/*.mainNav ul li.has-subnav .accordion-btn:hover {background:#ccc;}*/
			
		
		@media screen and (max-width: 1024px) {
			.mainNav {width: 40%;}
		}
		@media screen and (max-width: 700px) {
			.mainNav {width: 100%;}
		}
		
		/*customized styles*/
	
	.accordion-btn-wrap.accordion-active > a, .accordion-btn-wrap > a  {padding:0!Important;}
	
	h3.first-level-section-nav {background: #066792;
								 color: #ffffff;
								...

JavaScript

/* Nav Accordion Plugin v1.1.2
************************************/
(function($){
	$.fn.navAccordion = function(options, callback){
		this.each(function(){
			
			//Options
			var settings = $.extend({
				expandButtonText : "+", //Text inside of expand button
				collapseButtonText: "-",  //Text inside of collapse button
				selectedExpand: "true",   //Expand the selected channel
				selectedClass: "selected",  //Class that will be used to detect the currently selected channel - this will check the "parentElement" for this class (the parent <li> by default)
				multipleLevels: "true",  //Apply accordion to all levels - setting this to false will apply the accordion only to the first level
				buttonWidth: "20%",  //Width of accordion expand/collapse button as a percentage or pixels
				buttonPosition: "right",  //Position of button - 'right' is default - you can also choose 'left'
				slideSpeed: "fast",   //Speed of slide animation - "fast", "slow", or number in milliseconds such as 500
				parentElement: "li",  //Parent element type, class or ID - you don't need to change this if you're using a ul > li > ul pattern
				childElement: "ul",   //Child element type, class or ID - you don't need to change this if you're using a ul > li > ul pattern
				headersOnly: false,  //False is default - setting to true will make any link with sub-nav behave as if it were set to header only, making the link inaccessible - this option is useful if you are using the plugin for a non-navigation area 
				headersOnlyCheck: false, // False is default - set to true to apply the accordion only to links that are set as "header only" (have no href)
				delayLink: false,  //Delay following the href of links until after the accordion the has expanded
				delayAmount: null //Time in milliseconds to delay before following href - will use "slideSpeed" by default if nothing else is set
			}, options);
			
			var container = this,
			//Multiple levels variable
				multi =...