Ver Mensaje Individual
  #5 (permalink)  
Antiguo 26/01/2006, 18:18
Avatar de Rebel001
Rebel001
 
Fecha de Ingreso: enero-2004
Mensajes: 140
Antigüedad: 20 años, 3 meses
Puntos: 0
Código:
<script type="text/javascript">
// <![CDATA[
/*************************************************************************
  This code is from Dynamic Web Coding at dyn-web.com
  Copyright 2001-5 by Sharon Paine 
  See Terms of Use at www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

function doTooltip(e, msg) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}
    
// tooltip content 
var tipMsg = [];
tipMsg['rich'] = '<div class="tp1">Some possibilities: images, lists, or other HTML elements - with styles or classes attached too!</div>';
tipMsg['img'] = '<div style="text-align:center"><img src="/images/btns/dot-com-btn.gif" width="176" height="30" alt="" /></div>';
tipMsg['imgTxt'] = '<img src="/images/common/sm-duck.gif" width="90" height="44" alt="" /><div class="tp2">Images and text can go together in a tooltip.</div>';
tipMsg['fm'] = "You can turn off this feature by setting the Tooltip.followMouse property to false.";
tipMsg['cstm'] = "You can control font, size, colors, width, border, offsets, etc. through style sheet and property settings.";
tipMsg['zip'] = "Click to download a zipped file with all the necessary code and example tooltip documents. (Version date: March 14, 2005)";
tipMsg['zip2'] = 'The download file contains the image text tooltip and hover tip also. (Version date: March 14, 2005)';
tipMsg['terms'] = "A license is required for most uses. Don't worry, the fee is very modest.";
tipMsg['bg'] = "The zipped download file contains an example demonstrating a background image in the tooltip."
tipMsg['mod'] = 'The image-text tooltip and hover tip also use the same basic tooltip code.';
tipMsg['txtImg'] = 'Click to see the specially formatted tooltip for images with descriptive text.';
tipMsg['wrtDrag'] = 'Write onclick to a layer you can drag. It has tooltip-like features. Set up for image display.';
tipMsg['menu'] = 'A modified tooltip that you can hover over and display links in.';
tipMsg['under'] = 'Tooltips and other DHTML layers appear behind form select lists in some browsers. Find a solution here.';
tipMsg['rollout'] = 'A zippier tooltip that rolls in and out of view using clipping to incrementally reveal and conceal the layer.';

// preload images
var imageHandler = { 
  imgs:[], path:"", preload:function() { for(var i=0;arguments[i];i++) {
    var img=new Image(); img.src=this.path+arguments[i]; this.imgs[this.imgs.length]=img;}}
}
imageHandler.preload("/images/btns/dot-com-btn.gif", "/images/common/sm-duck.gif");
// ]]>
</script>
Eso es lo que yo encontré en la web esa de tooltips

y para mostrarlo solo tienes que poner
onmouseover="doTooltip(event, tipMsg['aquielnombre'] )"

Última edición por Rebel001; 26/01/2006 a las 18:25