JSFiddle - React, Tailwind, and code Playground

by Gabriel

HTML

<div id="dd" class="wrapper-dropdown-5" tabindex="1">Bienvenido! <span class="botonp2"><i class="fa fa-eye"></i></span>  
<span class="dropdown">

    </span>
</div>

CSS

body {
    background: black;
}

.wrapper-dropdown-5 {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    cursor: pointer;
    float: left;
    margin: 4px auto 0;
    outline: medium none;
    padding: 12px 15px;
    position: relative;
    transition: all 0.3s ease-out 0s;
    width: auto;
}
.wrapper-dropdown-5 .dropdown {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background: none repeat scroll 0 0 #FFFFFF;
    border-color: -moz-use-text-color rgba(0, 0, 0, 0.2);
    border-image: none;
    border-radius: 0 0 5px 5px;
    border-style: none solid;
    border-width: medium 1px;
    left: 0;
    list-style: none outside none;
    max-height: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 35%;
    transition: all 0.3s ease-out 0s;
    width: 257px;
}
.wrapper-dropdown-5 {
    padding: 0 10px;
}
.wrapper-dropdown-5 {
    border-bottom: 1px solid #E6E8EA;
    color: #333333;
    display: block;
    padding: 10px 0;
    text-decoration: none;
    transition: all 0.3s ease-out 0s;
}
.wrapper-dropdown-5 {
    border: medium none;
}
.wrapper-dropdown-5 {
    color: inherit;
    margin-right: 5px;
    vertical-align: middle;
}
.wrapper-dropdown-5 {
    color: white;
    font-weight: lighter;
    margin-left: 25px;
    z-index: 999999;
}
.wrapper-dropdown-5.active .dropdown {
    box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.25);
    color: #000000;
    margin-top: 27px;
    max-height: 443px;
    padding: 8px;
    position: absolute;
}
.derechaso li {
    color: #444444;
    list-style: none outside none;
    margin-left: -30px;
}
.soyotro2 {
    background: none repeat scroll 0 0 #F6F6F6;
    border-left: 1px solid #DCDCDC;
    border-right: 1px solid #DCDCDC;
    font-size: 11px;
    line-height: 26px;
    margin-left: -2px;
    margin-top: 4px;
    padding: 6px 2px;
}
#izquierdaso {
    border-left: 1px dashed #DCDCDC;
    color:...

JavaScript

jQuery.noConflict();
jQuery(document).ready(function($) {

function DropDown(el) {
 this.dd = el;
 this.initEvents();
  }
   DropDown.prototype = {
    initEvents : function() {
     var obj = this;

     obj.dd.on('click', function(event){
      $(this).toggleClass('active');
      event.stopPropagation();
   }); 
   }
  }

   $(function() {
                                var dd = new DropDown( $('#dd') );

    $(document).click(function() {
     $('.wrapper-dropdown-5').removeClass('active');
    });

   });
});