2
我使用tooltipster來構建一些標註。我點擊了一些,懸停的一些。工具提示關閉所有打開新工具前,點擊/懸停組合
JS:
var instances = $.tooltipster.instances();
$('.mgu-click').tooltipster({
functionBefore: function(instance, helper) {
$.each(instances, function(i, instance) {
instance.close();
});
},
contentCloning: true,
trigger: 'click',
'maxWidth': 280,
'minHeight': 280,
animation: 'grow',
interactive: true,
arrow: false,
distance: -10,
contentAsHTML: true,
theme: 'tooltipster-shadow'
});
$('.mgu-hover').tooltipster({
functionBefore: function(instance, helper) {
$.each(instances, function(i, instance) {
instance.close();
});
},
contentCloning: true,
trigger: (browser.hasTouchEvents()) ? 'click' : 'hover',
'maxWidth': 280,
'minHeight': 280,
animation: 'grow',
interactive: true,
arrow: false,
distance: -10,
contentAsHTML: true,
theme: 'tooltipster-shadow'
});
如果你點擊或移動到tooltipster-BTN所有其他選擇開放之前應該關閉。 functionBefore與觸發器正常工作:單擊。但是,如果我用觸發器盤旋來呼叫,那麼所有其他的都不關閉。
感謝您的幫助
謝謝,完美! –