JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<a href="http://www.google.com" target="_blank">Dorp <i class="arrow-down">V</i></a>
CSS
a {
font-size: 16px;
display: block;
border: 1px solid blue;
overflow: auto;
text-align: center;
position: relative;
padding: 10px;
}
.arrow-down {
font-weight: bold;
font-size: 18px;
display: inline-block;
border: 1px solid red;
position: absolute;
right: 0;
top: 0;
bottom: 0;
padding: 10px;
z-index: 10;
}
JavaScript
$(document).ready(function(){
$(document).on('click', function(e){
if($(e.target).hasClass('arrow-down')){
// If the target has the class 'arrow-down' preventDefault to stop normal behavior
e.preventDefault();
// Function to display dropdown
alert('only the arrow!');
}
});
})