JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container_16">
<div class="nav-main grid_16">
<div class="wrap-nav-media">
<ul id="nav-top-media">
<!-- ONE -->
<li class="nav-item-1"><a href="..company-overview">Parent Menu One</a>
<div style="display: none;" class="inner-nav-media">
<ul>
<li class=""><a class="current" href="../directors" rel="sub-1-relative-1">sub-1-relative-1</a>
</li>
<li class=""><a class="current" href="../management-team" rel="sub-1-relative-2">sub-1-relative-2</a>
</li>
<li class="last"><a class="current" href="../tems.html" rel="sub-1-relative-3">sub-1-relative-3</a>
</li>
</ul>
<div style="display: block;" class="menu-page first" id="mega-sub-1-relative-1"> <a href="../board-of-directors" title="Board of Directors" rel="nofollow" class="thumb">
<div style="height:80px width:80px; background-color:yellow;float:right;">IMAGE</div>
</a>
<div>
<p>Brief Contents will show up here sub-1-relative-1</p>
</div>
</div>
<div style="display: block;" class="menu-page" id="mega-sub-1-relative-2"> <a href="../management-team" title="Management Team" rel="nofollow" class="thumb">
<div style="height:80px width:80px; background-color:yellow; float:right;">IMAGE</div>
</a>
<div>
<p>Brief Contents will show up here sub-1-relative-2</p>
</div>
</div>
<div style="display: none;" class="menu-page" id="mega-sub-1-relative-3"> <a href="../vision.html" title="Vision"...
CSS
html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,abbr,address,cite,code,del,dfn,em,img,ins,kbd,q,samp,small,strong,sub,sup,var,b,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video {
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
margin:0;
padding:0;
}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
display:block;
}
blockquote,q {
quotes:none;
}
blockquote:before,blockquote:after,q:before,q:after {
content:none;
}
a {
font-size:100%;
vertical-align:baseline;
background:transparent;
margin:0;
padding:0;
}
hr {
display:block;
height:1px;
border:0;
border-top:1px solid #ccc;
margin:1em 0;
padding:0;
}
body {
font:13px/1.231 Arial, Helvetica, sans-serif;
font-size:small;
}
html {
overflow-y:scroll;
}
a:hover,a:active,a:focus {
outline:0 none;
}
a,a:active,a:visited {
color:#402d5d;
text-decoration:none;
}
li {
background:url(/site/skins/v1-en/images/arrow-l1.gif) no-repeat 0 6px;
margin:0;
padding:0 0 0 10px;
}
ol {
list-style-type:decimal;
}
body {
min-width:960px;
}
.container_16 {
margin-left:auto;
margin-right:auto;
width:960px;
}
#nav-top-media a
{
color:red;
padding-left:20px
}
.nav-main {
background:url(/site/skins/v1-en/images/bg-nav-main-ul.gif) repeat-x left top;
}
.nav-main ul {
background:url(/site/skins/v1-en/images/bg-nav-main.png) no-repeat center -6px;
float:left;
width:898px;
position:relative;
z-index:999;
margin:0;
padding:0 21px;
}
.nav-main li {
float:left;
background:none;
position:relative;
margin:0;
padding:0;
}
.inner-nav-media {
position:absolute;
left:-9px;
top:15px;
background:url(/site/skins/v1-en/images/bg-sub-nav-main.png) no-repeat 0 bottom #ccc;
display:none;
width:577px;
z-index:999;
padding:0 18px 23px 28px;
}
.nav-info...
JavaScript
$(document).ready(function () {
$('#nav-top-media > li').each(function (i) {
var liCount = i + 1;
$(this).addClass("nav-item-" + liCount);
});
$('.nav-main li a').hover(function () {
$(this).parent("li").find("div.inner-nav-media").show();
$(this).parent("li").find(".menu-page").hide();
$(this).parent("li").find(".nav-info").show();
$(this).parent("li").addClass('on');
$(this).parent("li").find("div.inner-nav-media ul li a").addClass('current');
}, function () {});
$('.nav-main li').hover(function () {
$(this).find("div.inner-nav-media").show();
$(this).find(".menu-page").hide();
$(this).find(".nav-info").show();
$(this).addClass('on');
$(this).find("div.inner-nav-media ul li a").addClass('current');
$(this).find("div.inner-nav-media").show();
$(this).find(".nav-info").show();
$(this).find(".first").show();
//$(this).find(".nav-info").hide();
}, function () {
$(this).removeClass('on');
$(this).find("div.inner-nav-media").hide();
$(this).find("div.inner-nav-media .nav-info .menu-page").show();
//$(this).find("div.inner-nav-media .nav-info .menu-page").hide();
$(this).removeClass('leftToright');
});
$('.nav-main li li').hover(function () {
$(this).parents("div.inner-nav-media").find('.menu-page').hide();
$('#mega-' + $(this).find("a").attr('rel')).show();
if ($(this).parents("li").hasClass("nav-item-4") || $(this).parents("li").hasClass("nav-item-5")) {
$(this).parents("li").addClass("leftToright");
}
$('#mega-' + $(this).find("a").attr('rel')).show();
$(this).parents("div.inner-nav-media").find('.menu-page').hide();
$('#mega-' + $(this).find("a").attr('rel')).show();
}, function () {
$('#mega-' + $(this).find("a").attr('rel')).show();
$(this).parents('li').find("div.inner-nav-media...