JSFiddle - React, Tailwind, and code Playground

by Vedankita Kumbhar

HTML

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<div class="col-12">
                                        <div class="row">
                                            <div class="col-6">
                                                <div class="hex2-row">
                                                    <div class="row">
                                                        <div class="col-12">
                                                            <div class="row">
                                                                <div class="col-6">
                                                                    <a class="hex2 odd" href="#">
                                                                        <div class="left"></div>
                                                                        <div class="middle">
                                                                            <span>A</span>
                                                                        </div>
                                                                        <div class="right"></div>
                                                                    </a>
                                                                    <ul style="display: none;">
                                                                        <li>
                                                                            <a>Lorem ipsum</a>
                                                                        </li>
                                  ...

CSS

.hex2-row {
    margin: 10px;
}

.hex2 {
    float: left;
    margin-right: -26px;
    margin-bottom: -50px;
    position: relative;
    
}
.hex2 .left {
    float: left;
    width: 0;
    border-right: 30px solid #6C6;
    border-top: 52px solid transparent;
    border-bottom: 52px solid transparent;
    box-shadow: 0 0 20px inset rgba(0,0,0,.5);
}
.hex2 .middle {
    float: left;
    width: 60px;
    height: 104px;
    background: #6C6;
    display: flex;
    justify-content: center;
}
.hex2 .middle span{
    align-self: center;
    font-weight: bold;
    color: #fff;
    font-size: 27px;
    
}
.hex2 .right {
    float: left;
    width: 0;
    border-left: 30px solid #6C6;
    border-top: 52px solid transparent;
    border-bottom: 52px solid transparent;
    box-shadow: 0 0 20px inset rgba(0,0,0,.5);
}
.hex2.even {
    margin-top: -27px;
}
.hex2.odd  .line{
    clear: both;
    height: 90px;
    width: 2px;
    background: #807c7c;
    margin: 0 auto;
    position: relative;
    top: 8px;
}
.hex2.odd  .line:before{
    content: "";
    position: absolute;
    height: 1px;
    width: 60px;
    box-shadow: 0px 1px 5px rgba(0, 0, 0, .6);
    background: #616164;
    left: -30px;
    top: 0;
}
.hex2.odd  .line::after{
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #616164;
    content: "";
    bottom: 0;
    right: -2px;
}
.hex2.even  .line{
    clear: both;
    height: 90px;
    width: 2px;
    background: #807c7c;
    margin: 0 auto;
    position: relative;
    top: -8px;
}
.hex2.even  .line::after{
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #616164;
    content: "";
    top: 0;
    right: -2px;
}
.hex2.even  .line:before{
    content: "";
    position: absolute;
    height: 1px;
    width: 60px;
    box-shadow: 0px 1px 5px rgba(0, 0, 0, .6);
    background: #616164;
    left: -30px;
    bottom: 0;
}

.hex2-row .hex2:first-child .left{
    border-right-color:...

JavaScript

var x;
            var y;

            $('.animateclass').each(function (index) {
                x = $(this).position().left;
                y = $(this).position().top;
            });
            $('.hex2').each(function (index) {
                var xi = $(this).position().left;
                var yi = $(this).position().top;
                // $(this).css('left', xi).css('top', yi);
                $(this).click(function () {
                    var l = $(this).parent().next().find('.heading').position().left;
                    var t = $(this).parent().next().find('.heading').position().top;

                    $(this).animate({
                        left: x,
                        top: y,
                        easing: 'easeOutQuad'
                    }, 1500, function () {
                        $(this).next('ul').show();
                    });


                })
            });