JSFiddle - React, Tailwind, and code Playground
HTML
<div onClick="openList(this);"> div
<div class="inc">
<div class="iWrap">
<a title="blah1 blah1">a1</a>
<a title="blah2 blah2">a2</a>
<a title="blah3 blah3">a3</a>
<a title="blah4 blah4">a4</a>
</div>
</div>
</div>
<div onClick="openList(this);"> div2
<div class="inc">
<div class="iWrap">
<a title="some text 1">a1</a>
<a title="some text 2">a2</a>
<a title="some text 3">a3</a>
<a title="some text 4">a4</a>
</div>
</div>
</div>
CSS
a {
color: #900;
text-decoration: none;
}
a:hover {
color: red;
position: relative;
}
a[title]:hover:after {
content: attr(title);
padding: 4px 8px;
color: #333;
position: absolute;
left: 0;
top: 100%;
white-space: nowrap;
z-index: 20px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-box-shadow: 0px 0px 4px #222;
-webkit-box-shadow: 0px 0px 4px #222;
box-shadow: 0px 0px 4px #222;
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #eeeeee),color-stop(1, #cccccc));
background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
}
JavaScript
function openList(obj)
{
var getTitletxt = $(obj).find('a').attr("title");
alert(getTitletxt );
}