Posted By

jonhenshaw on 10/20/06


Tagged

javascript library prototype tooltip


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

rnrleachryan
fantomex
vali29
hans


Prototype Based JavaScript Tooltip


 / Published in: JavaScript
 

URL: http://ajaxian.com/archives/prototype-based-javascript-tooltip

JavaScript Tooltip libraries number about as many as rounded CSS corner libraries.

Jonathan Weiss thought the ones he saw were "too complicated and bloated, did just too much and most of the time were still not flexible enough with the tooltip. So I decided to create my own library that is based on prototype.js".

  1. <script src="/javascripts/prototype.js" type="text/javascript"></script>
  2. <script src="/javascripts/tooltip.js" type="text/javascript"></script>
  3. <div id='tooltip' style="display:none; margin: 5px; background-color: red">
  4. Detail infos on product 1....<br />
  5. </div>
  6.  
  7. <div id='product_1'>
  8. This is product 1
  9. </div>
  10.  
  11. <script type="text/javascript">
  12. var my_tooltip = new Tooltip('product_1', 'tooltip')
  13. </script>

Report this snippet  

You need to login to post a comment.