JSFiddle - React, Tailwind, and code Playground

by Sunny Jain

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<nav ng-app="topNavApp" ng-controller="navCtrl" class="nav">
  <div class="nav-center">
	<!--<li ng-repeat="obj in pageData.allChildList" ng-model="parentNav" ng-mouseover="parentNav=true" ng-mouseleave="parentNav=false"> -->
	<div ng-repeat="obj in pageData.allChildList" class="hiding-div" ng-mouseover="showDiv()" ng-mouseleave="hideDiv()" > 
	  <div>
		<a ng-href="{{obj.pagePath}}" class="main-link multiple menu-link">{{obj.pageTitle}}</a>
		<!--<span class="main-link mobile" aria-labelledby="{{obj.pageTitle}}" aria-expanded="false">{{obj.pageTitle}}</span>-->

		<!--<span ng-repeat="child in obj.secondLevelVoList" class="childNav" ng-show="parentNav">--> 
		<div class="farm-links" ng-show="hovering">
		  <!--<a class="prev-link" aria-labelledby="{{obj.pagetitle}}">{{obj.pageTitle}}</a>-->
		  <div ng-repeat="child in obj.secondLevelChildList" class="groups-links">
			<a ng-href="{{child.pagePath}}" class="group-title">{{child.pageTitle}}</a>
			<!--<span class="group-title mobile" aria-expanded="false">{{child.pageTitle}}</span>-->
			<ul ng-repeat="subchild in child.thirdLevelChildList" class="group-links">
			  <li class="second-link">
				<a ng-href="{{subchild.pagePath}}">{{subchild.pageTitle}}</a>
			  </li>
			</ul>
		  </div>
		</div>
	  </div>
	</div>
  </div>
</nav>

CSS

.hiding-div{
	display: inline-block;
	padding: 10px;
	margin: 10px;
}

.menu-link{
	text-decoration: none;
}

.menu-link:hover{
	color: #AB09AF;
}

.farm-links{
	position: absolute;
	top: 50px;
	height: 400px;
	width: 700px;
	border: 1px solid lightgrey;
	padding: 5px;
	display: flex;
	word-wrap: flex;
	column-count: 4;
}


.groups-links{
	display: inline-block;
	margin-right: 60px;

}

.group-title{
	color: grey;
	text-decoration: none;
}

.group-links{
	list-style: none;
}

.second-link{
	margin-left: -40px;
}

.second-link > a{
	text-decoration: none;
}

JavaScript

angular.module('topNavApp', ['ngAnimate']).controller('navCtrl', ['$scope', '$timeout', function($scope, $timeout){
  $scope.pageData = {  
    "allChildList":[  
      {  
         "pageExist":true,
         "pageTitle":"About Abc",
         "pagePath":"http://www.yahoo.com",
         "openNewTab":true,
         "hideInTabletNav":true,
         "hideInMobileNav":true,
         "secondLevelChildList":[  
            {  
               "pageExist":true,
               "pageTitle":"News",
               "pagePath":"/content/myloc/about-Abc/news.html",
               "openNewTab":false,
               "thirdLevelChildList":[  

               ],
               "multiple":true,
               "thirdLevelPageExist":true
            },
            {  
               "pageExist":true,
               "pageTitle":"Company",
               "pagePath":"/content/myloc/about-Abc/company.html",
               "openNewTab":false,
               "thirdLevelChildList":[  
                  {  
                     "pageExist":true,
                     "pageTitle":"Strategy",
                     "pagePath":"/content/myloc/about-Abc/company/strategy.html",
                     "openNewTab":false
                  },
                  {  
                     "pageExist":true,
                     "pageTitle":"Mission Vision Values",
                     "pagePath":"/content/myloc/about-Abc/company/missionvisionvalues.html",
                     "openNewTab":false
                  },
                  {  
                     "pageExist":true,
                     "pageTitle":"Leadership",
                     "pagePath":"/content/myloc/about-Abc/company/leadership.html",
                     "openNewTab":false
                  },
                  {  
                     "pageExist":true,
                     "pageTitle":"Org Chart",
                     "pagePath":"http://mysite/pages/OrgChart.aspx",
                     "openNewTab":false
                  },
               ...