Tooltip is not displaying. Only the title, which is usually displayed in a browser, is showing…What can i do?
Here is my code.
Html code:
<form action="/validate.php" method="post" id="myform">
<table width="100%" border="1"><tr><td style="max-width:150px;">
<span id="l1" class="label">Username:</span></td><td
style="min-width:500px;"><input type="text" name="username" id="username"
class="input" title="Username must contain only alphabets and numbers"/>
</td></tr><tr><td>
<span class="label" id="l2">Password:</span></td><td><input
type="password" name="pass" id="pass" class="input"/>
</td></tr><tr><td>
<span class="label" id="l3">Repeat password:</span></td><td><input
type="password" name="rep-pass" id="rep-pass" class="input"/>
</td></tr></table>
</form>
Css:
.tooltip {
background-color:#000;
border:1px solid #fff;
padding:10px 15px;
width:200px;
display:none;
color:#fff;
text-align:left;
font-size:12px;
-moz-box-shadow:0 0 10px #000;
-webkit-box-shadow:0 0 10px #000;
}
Jquery:
$(document).ready(function() {
$("#myform :input").tooltip({
position: "center right",
offset: [-2, 10],
effect: "fade",
opacity: 0.7
});
});
Try updating your jQuery UI library. I could be wrong but your library that is version 1.8.2 should be your jQuery Library. jQuery UI has been above that number for quite a while. Even so, you must be running jQuery UI version 1.9.0 in order to use the new features such as menus, tooltips, etc.
Download jQuery UI 1.9.0