Help! I try to create a mobile navigation bar at the bottom but for some reason my href link cannot be clicked. When I try to inspect the element with Google Chrome it kept select div instead of the href link
My code
$(document).ready(function() {
$(".home1").click(function() {
alert($(this).attr("navi"));
});
});
.mobile_navigator {
display: block;
/*overflow: hidden;*/
background-color: #0e8ce4;
position: fixed;
bottom: 0;
height: 60px;
width: 100%;
z-index: 1;
box-shadow: 0 -5px 15px 0 rgba(0, 0, 0, 0.2)!important;
}
.mobile_navigator div {
width: 20%;
float: left;
padding: 8px 0 8px 0;
pointer-events: none;
cursor: default;
z-index: 10;
position: relative;
}
.mobile_navigator div i {
text-align: center;
display: block;
font-size: 15px;
padding: 13px 0 5px 0;
}
.mobile_navigator span {
text-align: center;
display: block;
font-size: 10px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<div class="mobile_navigator">
<div navi="#">
<i class="fa fa-user"></i>
<span>MENU</span>
</div>
<div navi="#">
<i class="fa fa-user"></i>
<span>MENU</span>
</div>
<div href="index.jsp?navi=home" navi="#" class="nav_active home1">
<i class="fa fa-home"></i>
<span>HOME</span>
</div>
<div navi="#">
<i class="fa fa-user"></i>
<span>FEED</span>
</div>
<div navi="#">
<i class="fa fa-user"></i>
<span>PROFILE</span>
</div>
</div>
When i try to alert when ever the link is clicked, javascript failed to execute because no link had been clicked