Jquery 将鼠标悬停在文本上以显示标记标题

Jquery 将鼠标悬停在文本上以显示标记标题,jquery,Jquery,当用户将鼠标悬停在文本上时,我试图在a标记旁边显示我的a标记中的标题。请使用此仅适用于HTML/CSS的代码 <a href="#" id="magic" title="This is my sample."> Hover over this text</a> <script> $('#magic').hover(function () { $(this).show('title') } ); </script> <a h

当用户将鼠标悬停在文本上时,我试图在a标记旁边显示我的a标记中的标题。请使用此仅适用于HTML/CSS的代码

<a href="#" id="magic"
 title="This is my sample.">
 Hover over this text</a>
<script>

    $('#magic').hover(function () { $(this).show('title') } );


</script>
<a href="#" id='myA' title='this is title'> this is text</a>
#myA:hover:after{
    content:attr(title);
    color:red
}