Tema: Usar el qtip
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/04/2013, 07:00
benitopro
 
Fecha de Ingreso: marzo-2013
Mensajes: 20
Antigüedad: 11 años, 2 meses
Puntos: 0
Pregunta Usar el qtip

Hola amigo, estoy intentado crear un qtip al clickar en unos td que pertenecen a la clase toolTipGrafico, cada una con su id. Y quiero pasarle esa id al qtip para hacer los cálculos correspondientes. Por ahora esto es lo que tengo, que no me coge la id...., haber si se os ocurre algo a vosotros.

Código Javascript:
Ver original
  1. $(".toolTipGrafico").each(function(){
  2.             var id = $(this).id;
  3.          
  4.             $(this).qtip({
  5.                 content: {
  6.                     // Set the text to an image HTML string with the correct src URL to the loading image you want to use
  7.                     text: 'nada',
  8.                     ajax: {
  9.                         url:'/serviceFactoryManager/qtipEvolucion.action?datos='+id // Use the rel attribute of each element for the url to load
  10.                     },
  11.                     title: {
  12.                         text: 'Evolución del Indicador', // Give the tooltip a title using each elements text
  13.                     }
  14.                 },
  15.                 position: {
  16.                     at: 'bottom center', // Position the tooltip above the link
  17.                     my: 'top center',
  18.                     viewport: $(window), // Keep the tooltip on-screen at all times
  19.                     effect: false // Disable positioning animation
  20.                 },
  21.                 show: {
  22.                     event: 'click',
  23.                     solo: true // Only show one tooltip at a time
  24.                 },
  25.                 //hide: 'unfocus',
  26.                 style: {
  27.                     classes: 'qtip-wiki qtip-light qtip-shadow'
  28.                 }
  29.             });
  30.         });

Y los td tienen esta pinta:
Código HTML:
Ver original
  1. <td id="Kpi_final-${itemOM.tbProfesionalIdProfesional}-2013-3" class="toolTipGrafico">${itemOM.kpiFinal}</td>

Gracias de antemano