JSFiddle - React, Tailwind, and code Playground

by Elvis Sedić

HTML

<ul id="accordion">
    <li id="acc-1"><div class="ac-inner"><h3>Kje se nahajamo</h3></div>
        <ul>
            <li><div class="ap-map"><div id="map-1-4fb11be592d55" class="wk-map wk-map-default" style="height: 360px; width: 508px; position: relative; background-color: rgb(229, 227, 223); overflow-x: hidden; overflow-y: hidden; " data-widgetkit="googlemaps" data-options="{&quot;title&quot;:&quot;Stanovanje Arnika&quot;,&quot;lat&quot;:&quot;46.4857944&quot;,&quot;lng&quot;:&quot;13.7887914&quot;,&quot;icon&quot;:&quot;red-dot&quot;,&quot;popup&quot;:1,&quot;text&quot;:&quot;&lt;div class=\&quot;wk-content\&quot;&gt;&lt;p&gt;Apartmaji 1000 ro\u017ea&lt;br \/&gt;Borov\u0161ka 53&lt;br \/&gt;4280 Kranjska Gora&lt;br \/&gt;email: &lt;a href=\&quot;mailto:stanovanja1000roza@gmail.com\&quot;&gt;stanovanja1000roza@gmail.com&lt;\/a&gt;&lt;br \/&gt;tel: +386 41 673 173&lt;\/p&gt;&lt;\/div&gt;&quot;,&quot;mainIcon&quot;:&quot;red-dot&quot;,&quot;style&quot;:&quot;default&quot;,&quot;width&quot;:508,&quot;height&quot;:360,&quot;mapTypeId&quot;:&quot;roadmap&quot;,&quot;zoom&quot;:15,&quot;mapCtrl&quot;:1,&quot;typeCtrl&quot;:0,&quot;directions&quot;:0,&quot;styler_invert_lightness&quot;:0,&quot;styler_hue&quot;:&quot;&quot;,&quot;styler_saturation&quot;:0,&quot;styler_lightness&quot;:0,&quot;styler_gamma&quot;:0,&quot;adresses&quot;:[]}"><div style="position: absolute; left: 0px; top: 0px; overflow-x: hidden; overflow-y: hidden; width: 100%; height: 100%; z-index: 0; "><div style="position: absolute; left: 0px; top: 0px; overflow-x: hidden; overflow-y: hidden; width: 100%; height: 100%; z-index: 0; "><div style="position: absolute; left: 0px; top: 0px; z-index: 1; cursor: url(http://maps.gstatic.com/mapfiles/openhand_8_8.cur), default; -webkit-transform-origin-x: 0px; -webkit-transform-origin-y: 0px; -webkit-transform: matrix(1, 0, 0, 1, 0, 0); "><div style="z-index: 100; position: absolute; left: 0px; top: 0px; "><div style="position: absolute; left: 0px; top: 0px;...

CSS

#accordion {
list-style: none;
padding: 0;
width: 527px;
}
#accordion li {
background: none;
padding-left: 0;
}
#accordion div.ac-inner {
display: block;
cursor: pointer;
margin-bottom: 10px;
padding: 0 7px;
border: 1px solid #ddd;
background: #F5F5F5; /* Old browsers */
background: -moz-linear-gradient(top, #FAFAFA 0%, #F5F5F5 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FAFAFA), color-stop(100%,#F5F5F5)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #FAFAFA 0%, #F5F5F5 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #FAFAFA 0%, #F5F5F5 100%);/* Opera 11.10+ */
background: -ms-linear-gradient(top,  #FAFAFA 0%,#F5F5F5 100%); /* IE10+ */
background: linear-gradient(top,  #FAFAFA 0%,#F5F5F5 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FAFAFA', endColorstr='#F5F5F5',GradientType=0 ); /* IE6-9 */
border-radius: 5px;
box-shadow: 0 1px 0 #fff inset;
-moz-box-shadow: 0 1px 0 #fff inset;
-webkit-box-shadow: 0 1px 0 #fff inset;
text-shadow: 0 1px 0 #fff;
-moz-text-shadow: 0 1px 0 #fff;
-webkit-text-shadow: 0 1px 0 #fff;
}
#accordion ul {
list-style: none;
padding: 0 0 0 0;
}
#accordion ul {
display: none;
}
#accordion ul li {
font-weight: normal;
cursor: auto;
background-color: #fff;
padding: 0 0 0 7px;
}

#accordion a {
text-decoration: none;
}
#accordion a:hover {
text-decoration: underline;
}
#accordion #acc-1 div.ac-inner {
background: url(../images/icons/map.png) no-repeat 0 0 #F5F5F5;
text-indent: 70px;
}
#accordion #acc-2 div.ac-inner{
background: url(../images/icons/calendar.png) no-repeat 0 0 #F5F5F5;
text-indent: 70px;
}
#accordion #acc-3 div.ac-inner {
background: url(../images/icons/camera.png) no-repeat 0 0 #F5F5F5;
text-indent: 70px;
}

JavaScript

$(document).ready(function() {
$('#accordion > li > div.ac-inner').click(function(){

if(false == $(this).next().is(':visible')) {
    $('#accordion ul').slideUp(300);
}
    $(this).next().slideToggle(300);
});
    //$('#accordion ul:eq(0)').show()
});