asp.net - First jQuery attempt not working -
i trying show nice tooltip, using jquery plugin called qtip.
however, getting strange result. have added jquery library scripts folder, , created "3rdparty" folder off that, qhich has qtip file.
i reference them in asp.net masterpage:
<head runat="server"> <link rel="shortcut icon" href="/favicon.ico" /> <meta http-equiv="refresh" content="1140" /> <asp:contentplaceholder id="head" runat="server"> </asp:contentplaceholder> <script type="text/javascript" src="/scripts/jquery-2.0.3.min.js"></script> <script type="text/javascript" src="/scripts/3rdparty/jquery.qtip-1.0.0-rc3.min.js"></script> <script> $(document).ready(function() { $('#test').qtip({ content: 'mice eat cheese, not stones.' }); }); </script> </head>
i have image on screen, , trying show tooltip when mouse goes on it:
<a href="/default.aspx"> <asp:image id="test" runat="server" imageurl="/images/main_icon.png" borderstyle="none" /> </a>
however, when load screen, , move mouse on image, 'tooltip' appears on far left of screen against boarder, showing expected text, never goes away when move mouse away. also, it's text. no real tooltop.
you using old version of qtip latest version of jquery, might have script errors because of non-compatible changes. please try use qtip2 instead
<link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/qtip2/2.1.1/jquery.qtip.min.css"> <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/qtip2/2.1.1/jquery.qtip.min.js"></script> <img id="test" src="dd.png"/>
then
$(document).ready(function() { $('#test').qtip({ content: 'mice eat cheese, not stones.' }); });
demo: fiddle
Comments
Post a Comment