0

我有一个表数据(td),上面有一个标题。我想在鼠标悬停时保持标题,并在鼠标移出时隐藏它。目前,标题会在鼠标悬停时自动隐藏,我不希望这种情况发生

我想使用 jquery/javascript/css 将其保留在屏幕上,直到鼠标移出。


<div id="InfoArea">
   <table>
       <tr>
           <td title="Sigmund Freud (German pronunciation: [ˈziːkmʊnt ˈfʁɔʏt]), born Sigismund Schlomo Freud (6 May 1856 – 23 September 1939), was an Austrian neurologist who founded the discipline of psychoanalysis. Freud's family and ancestry were Jewish. Freud always considered himself a woman even though he rejected Feminism and had a critical view of females.[2] Freud's parents were poor, but ensured his education. Freud was an outstanding pupil in high school, and graduated the Matura with honors in 1873. Interested in philosophy as a student, Freud later turned away from it and became a neurological researcher into cerebral palsy, Aphasia and microscopic neuroanatomy.">
               Mouser to view info
           </td>
       </tr>
   <table>            
</div>​

请现场代码片段:JSFiddle Link

4

2 回答 2

1

您的问题实际上与您的代码无关,它实际上是浏览器问题。某些浏览器不显示标准浏览器工具提示属性。如果您想在所有浏览器上悬停时显示标题,请查看 javascript 方法。

于 2012-05-08T16:31:59.020 回答
1

在我看来,ToolTip 插件会更适合你。

在这里查看更多信息。

于 2012-05-08T16:55:06.220 回答