2011-03-09 5 views
2

J'utilise:Jquery pop-up infobulle

jQuery Bubble Popup v.2.3.1 
http://maxvergelli.wordpress.com/jquery-bubble-popup/ 

Vous êtes censé avoir ce dans le document prêt:

$('.bubble').CreateBubblePopup({ 
     align: 'center', 
     innerHtml: 'TEXT GOETH HERE!',   // THIS IS THE LINE 
     innerHtmlStyle: { 
      color: '#FFFFFF', 
      'text-align': 'center' 
     }, 
     themeName: 'all-black', 
     themePath: 'plugins/bubble/themes' 
    }); 

Vous devez définir explicitement le texte de la souris sur ... est-il possible de mettre le texte aux éléments alt atribute? Ou encore mieux, un attribut personnalisé sur l'élément? Quelque chose comme:

innerHtml: this.attr("alt"), 

Mais cela ne fonctionne pas comme «ce n'est pas définie

Répondre

3

Dans le document fonction prêt:

$('.bubble').each(function(){ 
    $(this).CreateBubblePopup({ 
     align: 'center', 
     innerHtml: $(this).attr('mouseoverText'), 
     innerHtmlStyle: { 
      color: '#FFFFFF', 
      'text-align': 'center' 
     }, 
     themeName: 'all-black', 
     themePath: 'plugins/bubble/themes' 
    }); 
}); 
+0

BRILLANT! Merci! –