Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to hide browser tooltip for links
    text
    copied!<p>Hi all I try to make my own tooltip script which follow my mouse with jQuery. Everything is okey but when I hover on link and wait few seconds browser use title for own tooltip. How I can stop this?!</p> <p>I look for solution without removing of title tag. </p> <p>My code:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Tooltip&lt;/title&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("a").mousemove("mouseover", function(e) { var x = e.clientX; var y = e.clientY-30; var text = $(this).attr("title"); var i = 0; for(i=0;i&lt;1;i++) { if(i=0) { $("body").append('&lt;div class="tooltip" style="margin-top:'+y+'px; margin-left: '+x+'px;"&gt;'+text+'&lt;/div&gt;'); } else { $("div.tooltip").remove(); $("body").append('&lt;div class="tooltip" style="margin-top:'+y+'px; margin-left: '+x+'px;"&gt;'+text+'&lt;/div&gt;'); } } }); $("a").mouseout(function() { $("div.tooltip").remove(); }); }); &lt;/script&gt; &lt;style&gt; body { top: 0px; left: 0px; margin: 0; padding: 0; } a { text-decoration: none; } div.tooltip { background-color: #123534; position: fixed; z-index: 2; padding: 5px; heigth: 30px; } div.menu { background-color: #666666; margin-left: 100px; margin-top: 100px; position: fixed; width: auto; z-index: 1; } ul { margin: 0; padding: 5px; list-style-type: none; } li { display: inline; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="menu"&gt; &lt;ul&gt; &lt;li&gt; &lt;a href="#" title="test" &gt;Link&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#" title="asd" &gt;Link&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#" title="123" &gt;Link&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And If anyone knows how to optimize my script I'll be very thankful ;] </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload