Ich habe eine Seite mit vielen Tooltips. Ich möchte jeden beim Klicken auf eine Schaltfläche einzeln anzeigen/ausblenden. Es funktioniert nicht für mich, kann jemand helfen?qTipp zeigen/verstecken Tooltip auf klicken
<span><input type="button" value="b1" onClick="showMyTT('div1');"></span><span><div id="div1"></div></span>
<span><input type="button" value="b2" onClick="showMyTT('div2');"></span><span><div id="div2"></div></span>
<span><input type="button" value="b3" onClick="showMyTT('div3');"></span><span><div id="div3"></div></span>
function showMyTT(id) {
$('#'+id).qtip({
content: {
text: 'Show the content',
title: false
},
position: {
my: 'left center',
at: 'left center'
},
show: {
event: false,
ready: true
},
hide: false,
style: {
classes: 'ui-tooltip-shadow ui-tooltip-jtools'
}
});
}
Danke
gibt es einen besseren Weg, um die Initialisierung zu tun, wie auf document.ready oder etwas? –
@ Bes-mM-bes Ich habe die Antwort aktualisiert. – freakish
ok danke, du bist verrückt. Es klappt !! –