<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: tool tip code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Tue, 19 Aug 2008 21:44:52 GMT</pubDate>
    <description>DZone Snippets: tool tip code</description>
    <item>
      <title>www.webscriptexpert.com - Java - Image based tool tips</title>
      <link>http://snippets.dzone.com/posts/show/3124</link>
      <description>// This script creates 'tool tips' for images. Use as much text as you want. Formatting is controlled through the use of style sheets. The text will resize, according to the screen width and placement of the cursor.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- TWO STEPS TO INSTALL IMAGE TOOL TIPS:&lt;br /&gt;&lt;br /&gt;1. Copy the coding into the HEAD of your HTML document&lt;br /&gt;2. Add the last code into the BODY of your HTML document --&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- STEP ONE: Paste this code into the HEAD of your HTML document --&gt;&lt;br /&gt;&lt;br /&gt;&lt;HEAD&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;!--&lt;br /&gt;#toolTipBox {&lt;br /&gt;display: none;&lt;br /&gt;padding: 5;&lt;br /&gt;font-size: 12px;&lt;br /&gt;border: black solid 1px;&lt;br /&gt;font-family: verdana;&lt;br /&gt;position: absolute;&lt;br /&gt;background-color: #ffd038;&lt;br /&gt;color: 000000;&lt;br /&gt;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;&lt;!--&lt;br /&gt;Created by: Saul Salvatierra :: http://myarea.com.sapo.pt&lt;br /&gt;with help from Ultimater :: http://ultimiacian.tripod.com */&lt;br /&gt;&lt;br /&gt;var theObj="";&lt;br /&gt;&lt;br /&gt;function toolTip(text,me) {&lt;br /&gt;theObj=me;&lt;br /&gt;theObj.onmousemove=updatePos;&lt;br /&gt;document.getElementById('toolTipBox').innerHTML=text;&lt;br /&gt;document.getElementById('toolTipBox').style.display="block";&lt;br /&gt;window.onscroll=updatePos;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function updatePos() {&lt;br /&gt;var ev=arguments[0]?arguments[0]:event;&lt;br /&gt;var x=ev.clientX;&lt;br /&gt;var y=ev.clientY;&lt;br /&gt;diffX=24;&lt;br /&gt;diffY=0;&lt;br /&gt;document.getElementById('toolTipBox').style.top = y-2+diffY+document.body.scrollTop+ "px";&lt;br /&gt;document.getElementById('toolTipBox').style.left = x-2+diffX+document.body.scrollLeft+"px";&lt;br /&gt;theObj.onmouseout=hideMe;&lt;br /&gt;}&lt;br /&gt;function hideMe() {&lt;br /&gt;document.getElementById('toolTipBox').style.display="none";&lt;br /&gt;}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;/HEAD&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- STEP TWO: Copy this code into the BODY of your HTML document --&gt;&lt;br /&gt;&lt;br /&gt;&lt;BODY&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;br /&gt;&lt;span id="toolTipBox" width="200"&gt;&lt;/span&gt;&lt;br /&gt;&lt;img src="yourImage.jpg" width="237" height="197" border="0" onmouseover="toolTip('Place your tool tip here',this)"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;center&gt;&lt;br /&gt;&lt;font face="arial, helvetica" size"-2"&gt;Free JavaScripts provided&lt;br&gt;&lt;br /&gt;by &lt;a href="http://www.webscriptexpert.com"&gt;Web Script Expert &lt;/a&gt;&lt;/font&gt;&lt;br /&gt;&lt;/center&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 11 Dec 2006 03:55:11 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3124</guid>
      <author>webscriptexpert (r)</author>
    </item>
  </channel>
</rss>
