質問のタイトルが正しいかどうかわかりません。コードを見てください:
var trails = new Array(trail1, trail2, trail3, trail4, trail5, trail6, trail7, trail8, trail9, trail10, trail11, trail12, trail13);
var circles = new Array(circle1, circle2, circle3, circle4, circle5, circle6, circle7, circle8, circle9, circle10, circle11, circle12, circle13);
var texts = new Array(text1, text2, text3, text4, text5, text6, text7, text8, text9, text10, text11, text12, text13);
for(var i=0;i<=13;i++) {
$([trails[i].node,circles[i].node,texts[i].node]).qtip({
content: {
text: 'test qtip',
title: {text: 'test', button: 'close'}
},
position: {
target: 'mouse',
adjust: {mouse: false}
},
show: {
event: 'click'
},
style: 'qtip-rounded qtip-shadow qtip-blue',
hide: {
event: 'click '
}
});
}
この例では、別の配列内の配列要素を呼び出しているため、それが正しいかどうかはわかりませんが、それ以外の場合は、circle[i] または text[i] をクリックしたときに .qtip が表示されませんが、trails[ をクリックしたときにのみ表示されます。私]。この問題を初心者にとってより複雑にする .node プロパティもあります。コードを改善して機能させる方法はありますか?