Sunday 15 March 2015

javascript - tooltip won't work; div won't display -



javascript - tooltip won't work; div won't display -

i'm new javascript, , i'm practicing making tooltip. text, of course, can't style what's in css.

i've been through many tutorials , q&a's trying find answer, , i'm still confused.

is there stands out in code getting in way?

here code:

<head> <style> body { background-color: gray; } .tooltip { background:blue; font-size:60px; height:70px; width:160px; padding:25px; color:black; } </style> </head> <body> <div id="demo"> <img src = "pic1.jpg" title="the tooltip text #1" /> </div> <script type="text/javascript" language="javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.1.min.js"></script> <script type="text/javascript" language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"> </script> <script> $(document).ready(function() { $("#demo img[title]").tooltip(); }); </script> </body>

javascript tooltip

No comments:

Post a Comment